Commit Graph
2 Commits
Author SHA1 Message Date
sylearnandClaude Opus 5.5 efe4a3873e refactor(solana): extract transaction parsing with mainnet fixtures
Move the per-transaction body of slotParse into parseTransaction so the
same parser can be used on getTransaction results. No behavior change:
`git diff -w` shows only the loop/return edits.

Add mainnet fixtures for legacy transfer (USDT), legacy transferChecked,
a transfer to a token account created in the same transaction, and a v1
transaction; expected transfers come from an independent decoder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 13:37:45 +08:00
sylearnandClaude Opus 5.5 1f127e237b fix(solana): skip transactions that failed on chain
- slotParse ignores transactions whose meta.err is not null. Failed
  transactions are still included in blocks with their instructions and
  token balances, but every transfer in them was rolled back.
- tradeConfirmHandle only confirms a signature that is finalized and has
  err == null; getSignatureStatuses reports failed transactions as
  finalized too.
- Add mainnet fixtures (failed v1 top-level transfer, failed v0 inner
  transfer, succeeded v0 inner transfer) and tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 13:22:43 +08:00