Skip to content

fix(sdk-coin-tia): normalize memo-suffixed recipients in verifyTransaction - #9944

Draft
akarath wants to merge 1 commit into
masterfrom
claude/brave-mayer-n85iev
Draft

akarath wants to merge 1 commit into
masterfrom
claude/brave-mayer-n85iev

Conversation

@akarath

@akarath akarath commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Description

TIA withdrawals to a memo-tagged recipient fail local validation with Tx outputs does not match with expected txParams recipients (reported on testnet, wallet 6ac4da81…).

CosmosCoin.verifyTransaction compares txParams.recipients, which carry the memo as address?memoId=X, against explainTransaction() outputs, which have a plain address plus a separate memo field, as raw strings. The built tx is correct (its memo 0 matches ?memoId=0), but the two sides never match, so every memo-tagged recipient is rejected.

Fix: override verifyTransaction in Tia to split the recipient with getAddressDetails() and compare {address, amount, memo?} on both sides. This mirrors the ZETA fix (51d997c). It also rejects a recipient missing its memoId when the tx has a memo, which the base class previously let through.

Scoped to sdk-coin-tia only. abstract-cosmos and the other Cosmos coins are untouched and have the same gap.

lodash is added to dependencies since it is now imported at runtime (it was already in the lockfile).

Issue Number

COINS-1760

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Added 3 unit tests to sdk-coin-tia: memo-suffixed recipient passes, mismatched memoId is rejected, missing memoId is rejected. Without the fix, the first and third fail.
  • BITGOJS_TEST_PASSWORD=test mocha in modules/sdk-coin-tia: 80 passing.
  • eslint clean and the module builds with tsc.
  • Not verified against a live testnet wallet.

🤖 Generated with Claude Code

https://claude.ai/code/session_0197EizfQXpRL29XyEsyVJ4k


Generated by Claude Code

…ction

CosmosCoin.verifyTransaction compared txParams.recipients, which encode
the memo as `address?memoId=X`, against explainTransaction() outputs
(plain address plus a separate memo field) as raw strings. Any
memo-tagged TIA recipient therefore failed local validation with
"Tx outputs does not match with expected txParams recipients", even
when the transaction was built correctly.

Override verifyTransaction in Tia to split the recipient address via
getAddressDetails() so both sides are compared as {address, amount,
memo?}. This also rejects a recipient missing its memoId when the tx
carries a memo, which the base implementation let through silently.

Mirrors the ZETA fix (51d997c). Scoped to sdk-coin-tia only.

Ticket: COINS-1760

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0197EizfQXpRL29XyEsyVJ4k
@linear-code

linear-code Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

COINS-1760

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Unit tests are failing on Node 26.x (Current release line, non-blocking). This is not an LTS version yet, so it does not block merge, but it signals an incompatibility to fix before Node 26.x becomes LTS.

View run

This branch has not been deployed

No deployments
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.

2 participants