Skip to content

feat(ripple): forward memo to device for THORChain XRP swap routing#42

Open
BitHighlander wants to merge 1 commit into
masterfrom
feat/xrp-memo-thorchain
Open

feat(ripple): forward memo to device for THORChain XRP swap routing#42
BitHighlander wants to merge 1 commit into
masterfrom
feat/xrp-memo-thorchain

Conversation

@BitHighlander
Copy link
Copy Markdown
Collaborator

Summary

  • Forward tx.value.memo to RippleSignTx protobuf when signing XRP transactions

Problem

The vault's XRP tx builder correctly parses THORChain swap memos and stores them in tx.value.memo, but rippleSignTx() in hdwallet-keepkey never called setMemo() on the protobuf message. The memo was dropped before reaching the device, so the firmware never included it in the signed XRPL transaction.

Change

One line in packages/hdwallet-keepkey/src/ripple.ts:

const memo = msg.tx.value.memo;
if (memo && memo.trim() && memo.trim() !== ' ') signTx.setMemo(memo.trim());

Dependencies

  • BitHighlander/device-protocol feat/xrp-memo-thorchainRippleSignTx proto must have field 7 (memo)
  • BitHighlander/keepkey-firmware feat/xrp-memo-thorchain — firmware must serialize the memo into XRPL Memos array

Test plan

  • XRP send without memo: works as before, no Memos field in serialized tx
  • XRP send with numeric memo: still routes to destinationTag (handled in vault's xrp.ts)
  • THORChain swap: memo =:ETH.ETH:0x... appears in device confirmation and is serialized into tx

Forward tx.value.memo to the RippleSignTx protobuf message so the firmware
can include it in the XRPL Memos array of the signed transaction.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hdwallet-sandbox Ready Ready Preview, Comment May 15, 2026 5:20pm

Request Review

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.

1 participant