Skip to content

Commit 6c4ad17

Browse files
committed
test(xrp): skip the THORChain memo test, without weakening its assertion
XRP memo is not a supported feature yet, and the assertion is correct -- it describes what the product needs, not what the code does. So it is skipped with a specific reason rather than rewritten to accept the loss. The memo cannot traverse hdwallet -> RippleSignTx. The KeepKey protobuf has no memo field (RippleSignTx carries fields 1-6; RipplePayment carries amount/destination/destination_tag), and hdwallet's rippleSignTx never reads tx.value.memo -- it references msg.tx.value exactly twice, .fee and .msg. The firmware therefore never receives a memo and cannot serialize one. No firmware change makes this pass. Making it green by asserting the memo is ABSENT would encode the bug as the contract, so the body is untouched and the skip reason says so explicitly. The host-side gap is tracked as keepkey/keepkey-vault#422: buildXrpTx routes THORChain memos to tx.value.memo, index.ts signs via rippleSignTx, and the memo is discarded -- producing a valid XRP payment to the THORChain inbound vault with no routing memo. XRP swaps do not currently work, so this is armed rather than actively losing funds, and the recommended host fix is to fail closed in buildXrpTx rather than sign a memo-less payment. Re-enable only when the signed serialization preserves the memo.
1 parent c75fbd5 commit 6c4ad17

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎tests/test_msg_ripple_sign_tx.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,20 @@ def test_sign(self):
100100
)
101101

102102

103+
@unittest.skip(
104+
"XRP memo is not a supported feature yet. A THORChain memo cannot "
105+
"traverse hdwallet -> RippleSignTx: the protobuf has no memo field "
106+
"(RippleSignTx carries 1-6, RipplePayment carries "
107+
"amount/destination/destination_tag), and hdwallet's rippleSignTx "
108+
"never reads tx.value.memo. The firmware therefore never receives it "
109+
"and cannot serialize it. Tracked as keepkey/keepkey-vault#422.\n"
110+
"\n"
111+
"This assertion is CORRECT and is deliberately left intact: it "
112+
"describes the behaviour the product needs. Do NOT make it pass by "
113+
"asserting the memo is absent -- that would encode the bug as the "
114+
"contract. Re-enable only when the signed serialization actually "
115+
"preserves the memo."
116+
)
103117
def test_sign_with_thorchain_memo(self):
104118
self.requires_fullFeature()
105119
self.requires_firmware("7.14.2")

0 commit comments

Comments
 (0)