fix(sdk-coin-ton): expose memo from TON transfer transactions#9338
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
fix(sdk-coin-ton): expose memo from TON transfer transactions#9338bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
Include the on-chain text comment (used as routing memoId) in the parsed transaction output for TON transfers. - Add optional `memoId` field to `TxData` interface in `iface.ts` - Populate `memoId` in `Transaction.toJson()` from `this.message` when transaction type is a plain `Send` transfer - Propagate `memo` into `inputs`/`outputs` entries in the `parseTransaction()` method in `ton.ts` - Extract `action.memo` from WASM-parsed send actions in `explainTransactionWasm.ts` and include it in output objects Without this fix, TON deposit transfers with a text comment (e.g. a customer's routing memoId like 572826509) returned `memoId=null` in the BitGo transfer response, making it impossible for Bullish and other integrators to credit the depositing user. Ticket: COINS-1247 Session-Id: f01b1f1e-d256-4604-bfdb-c17205eda6f3 Task-Id: 6eefbcbb-ceb1-4c13-b32f-be3cc12e6c2c
Contributor
bitgo-ai-agent-dev
Bot
force-pushed
the
coins-1247-ton-deposit-memo
branch
from
July 23, 2026 02:46
8ee8c15 to
8ddf8ae
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
memoIdfield toTxDatainterface iniface.tsmemoIdinTransaction.toJson()fromthis.messagewhen the transaction type is a plainSendtransfer (guarded against structured opcode payloads)memointoinputs/outputsentries inparseTransaction()inton.tsaction.memofrom WASM-parsed send actions inexplainTransactionWasm.tsand include it in output objectssignedSendTransactionWithNumericMemotest fixture and aparseTransactiontest asserting the memo is correctly returnedWhy
Bullish reported (support ticket #369734) that TON deposits with an on-chain text comment returned
memoId=nullin the BitGo transfer response. On the TON blockchain, text comments encoded in transaction bodies are the standard way to route deposits to the correct customer account. Without the memo being propagated through the SDK's parsed transaction output, integrators cannot credit the depositing user, causing stuck/unattributed funds.The root cause was that
Transaction.toJson()never surfaced themessagefield (which holds the parsed text comment), andparseTransaction()inton.tsonly returnedaddressandamountin itsinputs/outputsentries — the memo was silently dropped.Test plan
should parse a TON transfer transaction with numeric memo (memoId)verifies thatparseTransaction()returnsmemo: '572826509'in bothinputsandoutputsfor a transfer with a numeric text commentmemoIdis only populated forTransactionType.SendTicket: COINS-1247