fix(abstract-substrate): skip recipient validation for token enablement txns#9288
Merged
nvrakesh06 merged 1 commit intoJul 18, 2026
Merged
Conversation
Contributor
nvrakesh06
force-pushed
the
nvrakeshreddy/cecho-1471-fix-token-enablement-verify
branch
from
July 18, 2026 11:45
f42cd51 to
8f4b765
Compare
…nt txns verifyTransaction reads _to from the decoded builder to verify the recipient address. TransferBuilder sets _to, but PreApproveAssetBuilder (used for enabletoken / preApproveAsset) only has _assetId — so _to is undefined, causing a spurious TxIntentMismatchRecipientError against the wallet's own root address. Guard the recipients check on txTo !== undefined so non-transfer transaction types (token enablement) are not falsely rejected. CECHO-1471
nvrakesh06
force-pushed
the
nvrakeshreddy/cecho-1471-fix-token-enablement-verify
branch
from
July 18, 2026 11:48
8f4b765 to
afe68aa
Compare
nvrakesh06
marked this pull request as ready for review
July 18, 2026 12:26
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.
Summary
verifyTransactioninabstract-substratereadstxBuilder['_to']to validate the recipient address againsttxParams.recipients. This works for transfer transactions (TransferBuildersets_to), butPreApproveAssetBuilder/V8PreApproveAssetBuilder(used for token enablement /preApproveAsset) only has_assetId— so_toisundefined.buildTokenEnablementspopulatesbuildParams.recipientsfor TSS wallets, the recipient check fires and throwsTxIntentMismatchRecipientErrorcomparing the wallet's root address againstundefined.txTo !== undefinedso non-transfer transaction types are correctly skipped.Root trigger: The v8 transfer routing fix (CECHO-1471,
36d878be05) madefactory.from(txHex)correctly route v8-encodedpreApproveAssettxns toV8PreApproveAssetBuilder, which surfaced this missing guard. Without the routing fix, v8 token enablement txns would fail at decode rather than reaching this check.Test plan
sdk-coin-polyx/test/unit/polyx.tsunderverifyTransaction > token enablement (preApproveAsset) transactionverifyTransactiontests continue to pass (11 passing)6a5b5835b08b0b019fe89a7313b3cbaa— token enablement fortpolyx:nvbitgotwas failing withTxIntentMismatchRecipientErrorbefore this fixCECHO-1471
🤖 Generated with Claude Code