Skip to content

Add XRP destination support - #1104

Open
ted-palmer wants to merge 2 commits into
mainfrom
ted/int2-762-add-xrp-vm-support-across-sdk-core
Open

Add XRP destination support#1104
ted-palmer wants to merge 2 commits into
mainfrom
ted/int2-762-add-xrp-vm-support-across-sdk-core

Conversation

@ted-palmer

Copy link
Copy Markdown
Collaborator

No description provided.

@ted-palmer
ted-palmer requested a review from pedromcunha August 10, 2026 16:19
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
relay-sdk-demo Ready Ready Preview Aug 10, 2026 4:21pm

Request Review

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ted-palmer's task in 2m 29s —— View job


Code Review — PR #1104: Add XRP destination support

  • Gather context (diff, commits)
  • Review SDK changes (address constants, dead-address logic)
  • Review XRP address validation (xrp.ts)
  • Review UI changes (type omissions, deposit addresses)
  • Post review

Code Review — 1 note

Overall this is a clean, well-scoped change. The XRP base58check validation in xrp.ts is correct (proper XRPL alphabet, leading-zero handling, 0x00 version pin, double-SHA256 checksum) and nicely documented. Broadening isDeadAddress to include the Tron/Zero/XRP burn addresses is consistent across all call sites — execute guard (execute.ts:66-70), balance-fetch skip (useMultiWalletBalances.ts:29), and the widget isConnected/error-well checks — so removing the standalone address !== tronDeadAddress comparisons in SwapWidget and WidgetErrorWell is behavior-preserving. Tests and changesets are included. 👍

  1. NOTE Type-safety: Omit on a string-literal union is a no-op
    packages/ui/src/utils/address.ts:39,50 (and the mirrored supportedWalletVMs props in SwapWidget/index.tsx:73, SwapWidgetRenderer.tsx:77,136, OnrampWidget/widget/index.tsx:29, OnrampWidgetRenderer.tsx:69, TokenSelector.tsx:72, PaymentMethod.tsx:60) — Omit<ChainVM, 'hypevm' | 'lvm' | 'xrpvm'> does not exclude those members from the union. Omit operates on object keys, so applied to a string-literal union it resolves to a string-like type and the intended exclusion is lost (which is also why the as Omit<...> cast at address.ts:50 is required to compile). The correct utility for excluding union members is Exclude<ChainVM, 'hypevm' | 'lvm' | 'xrpvm'>. This is pre-existing — the PR only extends the established pattern by adding 'xrpvm', so it's consistent with surrounding code and not a blocker for this PR — but worth a follow-up cleanup since the current form provides no compile-time protection against passing an unsupported VM type. Fix this →

Nothing else flagged — correctness, error handling, and the address/checksum math all check out.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ted-palmer's task in 1m 50s —— View job


📝 Docs Drift Check — No docs impact

This PR does not touch surfaces that require a relayprotocol/relay-docs update.

XRP Ledger is added as a destination-only VM: it flows through existing generic interfaces (recipient-address validation, dead-address handling, and the deposit-address fallback UX already documented for supportedWalletVMs). xrpvm is intentionally excluded from supportedWalletVMs and has no wallet adapter, so the adapter vmType list stays accurate. No documented SDK action, hook, UI component, or public type signature changed, and supported destination chains are served dynamically — no reference page goes stale.

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