Skip to content

feat: Support quarantine release for Ripple Custody - #39

Open
pdp2121 wants to merge 1 commit into
mainfrom
ripple-custody-quarantine-release
Open

feat: Support quarantine release for Ripple Custody#39
pdp2121 wants to merge 1 commit into
mainfrom
ripple-custody-quarantine-release

Conversation

@pdp2121

@pdp2121 pdp2121 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

  • Add opt-in quarantine auto-release for Ripple Custody (default off). When enabled, after a token-movement transaction confirms, the SDK detects transfers compliance quarantined and auto-proposes their release, surfacing the release intent ids on the result.
  • Add custody.releaseQuarantinedTransfers({ accountId, transferIds }) for manual release and the async-submission path.

Context of Change

  • Quarantine is applied asynchronously by compliance after settlement, so detection polls getTransfers?transactionId=… until each transfer's status is decided, then releases the quarantined ones (grouped by custodied account, recipient-else-sender) via api.propose.
  • Blocks inline so release ids are returned on the submission result; proposes only — release still runs the account's M-of-N policy.
  • Best-effort: a detection/propose failure never fails an already-confirmed payment. Gated to token-movement transactors and the native path; raw + submitAsync use the manual method.
  • Config: defaultAutoReleaseQuarantine and quarantinePollTimeoutMs on create/fromEnv; per-call autoReleaseQuarantine on the submission context.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)

Test Plan

  • Unit: new quarantine-release suite covering grouping, gating, timeout best-effort, failure-swallowing, and the Custody null-cursor pagination terminator; full unit tier green.
  • Contract (live sandbox): non-mutating detection check against getTransfers and a v0_ReleaseQuarantinedTransfers dry-run — both pass. (This caught and fixed a real pagination hang on Custody's literal-null last-page cursor.)

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