Skip to content

fix(sdk-coin-sol): support unsupported tokens in verifyTransaction#9104

Open
abhishekagrawal080 wants to merge 1 commit into
masterfrom
CSHLD-1111
Open

fix(sdk-coin-sol): support unsupported tokens in verifyTransaction#9104
abhishekagrawal080 wants to merge 1 commit into
masterfrom
CSHLD-1111

Conversation

@abhishekagrawal080

Copy link
Copy Markdown
Contributor

TICKET: CSHLD-1111

sol.ts — fixed the setter call and added fallback logic:

  • transaction.setUseTokenAddressTokenName(true) (line 537) — uses the correct setter
  • filteredRecipients pick includes tokenAddress and programId (line 574)
  • ATA derivation (lines 612–624) — falls back to recipientFromUser.tokenAddress / programId when the static map has no entry
  • Consolidation path (lines 648–663) — uses the mint address as-is for tokens not in the static map

iBaseCoin.ts — ITransactionRecipient now has optional tokenAddress?: string and programId?: string

test/unit/sol.ts — 4 new tests covering:

  1. Unsupported SPL token (TOKEN_PROGRAM_ID) with tokenAddress+programId → passes
  2. Unsupported SPL token without those fields → rejected
  3. Unsupported Token-2022 token with correct programId → passes
  4. Unsupported Token-2022 token with wrong programId → rejected

@linear-code

linear-code Bot commented Jun 24, 2026

Copy link
Copy Markdown

CSHLD-1111

@alextse-bg alextse-bg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wallet changes lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants