Skip to content

fix(sdk-coin-sol): use null check for decimalPlaces in token transfer builders#8377

Merged
ArunBala-Bitgo merged 1 commit intomasterfrom
CECHO-606
Mar 30, 2026
Merged

fix(sdk-coin-sol): use null check for decimalPlaces in token transfer builders#8377
ArunBala-Bitgo merged 1 commit intomasterfrom
CECHO-606

Conversation

@ArunBala-Bitgo
Copy link
Copy Markdown
Contributor

@ArunBala-Bitgo ArunBala-Bitgo commented Mar 30, 2026

Summary

  • Fix JS falsy check bug where decimalPlaces: 0 (e.g. NFTs) causes buildImplementation to skip the sendParams branch and throw "Could not determine token information" during PA approval
  • Changed && sendParams.decimalPlaces to && sendParams.decimalPlaces != null in both tokenTransferBuilder.ts and transferBuilderV2.ts

Impact

  • Blocks all SPL token transfers where decimalPlaces is 0 (NFTs, certain tokens)
  • Affects uniqueDoubleSpendPreventionIdsbuild() path during pending approval

Test plan

  • TypeScript compilation passes
  • Unit tests pass
  • Verify NFT transfer via customTx completes PA approval after deploy

TICKET: CECHO-606

🤖 Generated with Claude Code

… builders

decimalPlaces of 0 (e.g. NFTs) is falsy in JS, causing
buildImplementation to skip the sendParams branch and throw
"Could not determine token information" during PA approval.

TICKET: CECHO-606

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ArunBala-Bitgo ArunBala-Bitgo requested a review from a team as a code owner March 30, 2026 10:29
@ArunBala-Bitgo ArunBala-Bitgo merged commit ade84e8 into master Mar 30, 2026
21 checks passed
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