fix(sdk-core): preserve tokenName and add SOL no-recipient intents - #9388
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
fix(sdk-core): preserve tokenName and add SOL no-recipient intents#9388bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
Contributor
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 07:33
13fb3a5 to
ace42a1
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 07:33
ace42a1 to
345d3d6
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 07:51
4b79462 to
4b081db
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 08:50
4b081db to
290f30a
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 08:50
290f30a to
907a783
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 08:53
907a783 to
34d4e18
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 08:53
34d4e18 to
af6b667
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 08:56
af6b667 to
26550db
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 08:56
26550db to
2e44d7a
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 08:56
2e44d7a to
fff9cd3
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 09:02
5829934 to
cd7129d
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 09:02
cd7129d to
187be6c
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 09:13
187be6c to
a814d7e
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 09:13
a814d7e to
50cc94e
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
2 times, most recently
from
July 30, 2026 09:35
1016ca9 to
95e9486
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 09:35
95e9486 to
38918c9
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 10:34
38918c9 to
6b7da7f
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 10:34
6b7da7f to
974c1b5
Compare
What changed: - resolveEffectiveTxParams now accepts an optional chainName parameter and preserves tokenName when mapping intent recipients from the persisted intent. Prefers intentRecipient.tokenData?.tokenName (structured field); falls back to amount.symbol when truthy and different from the native chain symbol — identical to the existing txParamsFromIntent logic in baseTSSUtils.ts. - NO_RECIPIENT_TX_TYPES: added three SOL EdDSA no-recipient intent types: stakingDelegate, stakingDeactivate, closeAssociatedTokenAccount. stakingAuthorize is intentionally NOT listed (high-risk authority change; must be validated at the coin layer, not bypassed here). - Tests: WCN-196 regression suite covering the tsol:usdc sendMany path that caused PR #9117 to be reverted; per-type tests for each new SOL allowlist entry; explicit assertion that stakingAuthorize still throws; edge cases for empty-string tokenName, mixed native+token recipients, data field preservation, and legacy ECDSA callers with tokenData. Why: resolveEffectiveTxParams dropped tokenName when building recipients from the persisted intent. SOL token sendMany (e.g. tsol:usdc) requires tokenName so verifyTransaction can derive the Associated Token Account address for comparison; without it every token transfer fails with 'Tx outputs does not match'. This was the root cause of the production incident in WCN-196 that caused PR #9117 to be reverted (commit 96658f1). The three new SOL entries cover intent types WP issues with no on-chain recipient (staking delegation, deactivation, and ATA-close). Without them the fail-closed guard would throw on every staking/ATA-close operation for SOL MPCv2 wallets once resolveEffectiveTxParams is wired into the EdDSA signing path (sibling ticket WCI-1111). Existing ECDSA callers (ecdsaMPCv2.ts, ecdsa.ts) do not pass chainName so their behavior is unchanged. References: WCI-1110, WCI-1100, WCN-196 Session-Id: 94a72c0d-fce8-4672-a6a4-26df25a64dfc Task-Id: 76f4312b-c52c-4478-94f6-457913e8c0b7
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 10:38
974c1b5 to
7568d18
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 10:38
7568d18 to
c686500
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1110-fix-resolve-effective-tx-params-sol
branch
from
July 30, 2026 10:38
c686500 to
6bcaa0c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
recipientUtils.ts—resolveEffectiveTxParams: accepts a new optionalchainNameparameter and now mapstokenNamefrom intent recipients. PrefersintentRecipient.tokenData?.tokenName(structured field), falls back tointentRecipient.amount.symbolwhen it differs from the native chain symbol and is non-empty — mirroring the logic already intxParamsFromIntent. Empty-stringtokenNameis treated as absent (same astxParamsFromIntent's&&guard).symbolIsTokenis now explicitly typedbooleanusingsymbol.length > 0.NO_RECIPIENT_TX_TYPES: three new SOL EdDSA intent types added:stakingDelegate,stakingDeactivate,closeAssociatedTokenAccount.stakingAuthorizeis intentionally not added (high-risk authority reassignment — must be validated at the coin layer).tsol:usdcsendMany path that originally caused the revert; plus per-type tests for each new SOL allowlist entry, an explicit assertion thatstakingAuthorizestill throws, edge cases for empty-stringtokenName, mixed native+token recipients,datafield preservation, and legacy ECDSA callers withtokenData.Why
resolveEffectiveTxParamsdroppedtokenNamewhen building recipients from the persisted intent. SOL tokensendMany(e.g.tsol:usdc) requirestokenNamesoverifyTransactioncan derive the Associated Token Account address for comparison; without it every token transfer failed with "Tx outputs does not match". This was the exact root cause of the production incident in WCN-196 (PR #9117 reverted in commit96658f105f).The three new SOL entries cover intent types that WP issues with no on-chain recipient (staking delegation, deactivation, and ATA-close). Without them the fail-closed guard in
resolveEffectiveTxParamswould throw on every staking/ATA-close operation for SOL MPCv2 wallets once this function is wired into the EdDSA signing path (sibling ticket WCI-1111).Existing ECDSA callers (
ecdsaMPCv2.ts,ecdsa.ts) do not passchainName, so their behavior is unchanged —tokenData?.tokenNameis still propagated for ECDSA token transfers and the symbol-based fallback is gated onchainNamebeing present.Test plan
yarn run unit-test --scope @bitgo/sdk-core -- -- --grep "recipientUtils"— all new and existing recipientUtils tests passecdsaMPCv2.ts/ecdsa.tsunit suites pass (no signature change for them)Ticket: WCI-1110