Skip to content

fix: assorted fixes - #37

Merged
pdp2121 merged 3 commits into
mainfrom
iou-issue-fix
Aug 25, 2026
Merged

fix: assorted fixes#37
pdp2121 merged 3 commits into
mainfrom
iou-issue-fix

Conversation

@pdp2121

@pdp2121 pdp2121 commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

  • Fix IOU amount scaling for Ripple Custody. Custody's IOU amount fields are integer counts of the XRPL minimum currency unit (10⁻⁸¹), but the SDK was forwarding the raw human decimal — under-sending every IOU amount by 10⁸¹. Added a toCustodyIouAmount helper that scales by 10⁸¹ at the four IOU send-sites (Payment, TrustSet limit, Clawback, offer legs), leaving XRP drops and MPT base-units untouched.

  • Require a real on-ledger tesSUCCESS before reporting success. The native custodian paths previously declared success as soon as the governance intent executed, so an on-chain tec failure slipped through as a "success." Added a shared on-ledger result gate (on-ledger-result.ts) that resolves the transaction by hash and raises unless it validated with tesSUCCESS, wired into both the Ripple Custody and Palisade native paths.

  • Unify intent polling and termination semantics. Standardized the distinction between an indeterminate outcome (timed out, still in flight → retry the same idempotency key) and a provably dead one (expired/replaced/on-chain failure → needs a fresh key), across the intent inspector, on-chain polling, and Ripple Custody submission.

  • Add native XRP DEX offer methods. New xrp.buyOffer / xrp.sellOffer / xrp.cancelOffer on the XRP vertical, mirroring the existing IOU offer surface (order types, permissioned-domain/hybrid options, offer replacement).

  • Clarify idempotency-key behavior per backend. Documented that de-duplication coverage differs by connector (Local: none; Ripple Custody: all operations; Palisade: payment path only), so callers know when a retry is safe versus when it can double-apply.

  • Tests and demos/examples. Added unit coverage for the scaling helper, the on-ledger gate, and the new XRP offers; added a live contract test that issues an IOU through Custody and asserts the correct on-chain magnitude; updated the examples and demos to match the new behavior.

@pdp2121
pdp2121 merged commit a65d74b into main Aug 25, 2026
6 checks passed
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