You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(sdk-core): preserve tokenName and add SOL no-recipient intents
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
0 commit comments