Files
bridge/cmd
zeekay 75c8c1bb78 feat(bridge): humanize XRP engine_result errors for SDK + UI
broadcast_driver.go::humanizeBroadcastErr now recognizes the most
common XRP engine_result codes and renders them as one-line user-
facing messages, matching the EVM-side humanization pattern:

  tecINSUFFICIENT_FUNDS / tecUNFUNDED → "Insufficient funds in release
                                          address — fund the MPC address"
  tecNO_DST                           → "XRP destination account is
                                          not activated — recipient must
                                          hold ≥10 XRP reserve"
  tefPAST_SEQ                         → "XRP sequence already used —
                                          bridge will requery and retry"
  tem*                                → "XRP transaction was malformed
                                          — bridge will retry"
  telINSUF_FEE_P                      → "XRP network fee too low for
                                          current load — bridge will retry"

The SDK + UI surface these from Swap.LastError so users see the
actionable cause (fund the wallet, activate the destination, etc.)
instead of the raw rippled error string.

Test: TestHumanizeBroadcastErr_XRPEngineResults covers all five new
mappings plus regression for the existing EVM mappings.
2026-05-27 18:15:03 -07:00
..