Repository navigation
fix(abstract-cosmos): verify memo-suffixed recipients against tx memo - #9940
Draft
ralph-bitgo[bot] wants to merge 1 commit into
Draft
ralph-bitgo[bot] wants to merge 1 commit into
ralph-bitgo[bot] wants to merge 1 commit into
Conversation
Contributor
Contributor
|
|
verifyTransaction compared txParams.recipients to the decoded outputs
as raw {address, amount} strings. Recipients using the BitGo combined
address+memo convention (address?memoId=X) therefore never matched the
plain on-chain address reported by explainTransaction(), so every
withdrawal to a memo-tagged recipient failed local validation with
"Tx outputs does not match with expected txParams recipients" even
though the prebuild was correct. This blocked TIA testnet withdrawals
in COINS-1760.
Normalize both sides to a {address, amount, memo?} shape via
getAddressDetails before comparing, which also checks the recipient
memoId against the transaction memo. This lifts the fix previously
applied per-coin in sdk-coin-zeta (COINS-1676) into the shared base
class so TIA and all other Cosmos coins behave consistently. The
now-redundant Zeta override and its unused lodash dependency are
removed, and regression tests cover the memo-suffixed recipient cases
for TIA.
Ticket: COINS-1760
Session-Id: 59955df8-a88a-4a5d-b7b4-b42d2da9596e
Task-Id: a5b99c75-8301-4e58-8dae-43b673a64970
ralph-bitgo
Bot
force-pushed
the
COINS-1760-memo-recipient-verify
branch
from
October 12, 2026 08:34
f6df366 to
74ae57a
Compare
This branch has not been deployed
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.
Description
What:
CosmosCoin.verifyTransactionin@bitgo/abstract-cosmoscomparedtxParams.recipientsagainst the decoded transaction outputs as raw{address, amount}strings. Recipients using the BitGo combined address+memo convention (address?memoId=X) therefore never matched the plain on-chain address thatexplainTransaction()reports, and local validation failed withTx outputs does not match with expected txParams recipientseven when the prebuild was correct.This change normalizes both sides to a common
{address, amount, memo?}shape viagetAddressDetailsbefore comparing, which also checks the recipientmemoIdagainst the transaction memo. The per-coin fix previously applied only insdk-coin-zeta(COINS-1676) is lifted into the shared base class so TIA and every other Cosmos coin (ATOM, OSMO, SEI, ...) behave consistently; the now-redundantZeta.verifyTransactionoverride is removed and TIA regression tests are added.Why: TIA withdrawals to memo-tagged recipients fail client-side before signing — reproduced on wallet
6ac4da812f35c0437d86b20a4307e41ain COINS-1760. The same base-class comparison backs all Cosmos coins, so any customer withdrawal to a tagged/exchange address written asaddress?memoId=Xfails the same way on every Cosmos coin, not just TIA.Behavior note: verification is now memo-aware in the fail-closed direction: a transaction that carries a memo whose recipient did not declare
?memoId=is rejected (previously the memo was ignored). A declared?memoId=must match the transaction memo.Issue Number
COINS-1760 — https://linear.app/bitgo/issue/COINS-1760/tia-withdrawal-fails-on-testnet-with-recipient-mismatch-error
Type of change
How Has This Been Tested?
yarn run unit-testscoped to all 17 Cosmos coin modules that depend onabstract-cosmos(asi, atom, baby, bld, coreum, cosmos, cronos, hash, initia, injective, islm, mantra, osmo, rune, sei, tia, zeta): all suites pass (TIA 80, ZETA 79; only pre-existingpendingskips).modules/sdk-coin-tia/test/unit/tia.tsusing the existingTEST_TX_WITH_MEMOfixture: (1) recipientto?memoId=5verifies successfully against the memo'd transfer, (2)?memoId=999999is rejected, (3) bare recipient against the memo'd tx is rejected.cosmosCoin.ts, tests (1) and (3) fail (test 1 with the exactTx outputs does not match with expected txParams recipientsfrom COINS-1760); with the fix all three pass.yarn lintandyarn check-fmtclean inabstract-cosmos,sdk-coin-zeta,sdk-coin-tia.Checklist:
Ticket: COINS-1760