Skip to content

fix(transfer): enforce transfer precision, authorization boundaries, and state-transition invariants - #1699

Open
0dillon wants to merge 1 commit into
Remitwise-Org:mainfrom
0dillon:feat/transfer-precision-auth-boundaries
Open

fix(transfer): enforce transfer precision, authorization boundaries, and state-transition invariants#1699
0dillon wants to merge 1 commit into
Remitwise-Org:mainfrom
0dillon:feat/transfer-precision-auth-boundaries

Conversation

@0dillon

@0dillon 0dillon commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

This PR resolves merge conflicts against latest \main\ and enforces exact precision, authorization boundaries, and robust state-transition guarantees for transfer composition and quotes:

Key Changes

  1. Transfer Amount Precision & Overflow Guards (Closes [Quality][High] transfer composition and quotes: amount precision and overflow — QE-2026-08 #1653):

    • Validates transfer amounts using exact non-negative integer string representations (
      awAmountString) and display limits before state transitions.
    • Enforces bounds on numeric and token symbol fields across \AssetDescriptorSchema\ and \EmergencyTransferConfigSchema.
    • Rejects invalid scale, negative values, and overflows before applying state mutations.
  2. Authorization & Tenant Capability Boundaries (Closes [Quality][High] transfer composition and quotes: authorization boundaries — QE-2026-08 #1650):

    • Enforces server-derived capability gating via /api/transfer-capability\ and verifies session authorization at review, bind, and submit boundaries.
    • Rejects missing, stale, version-drifted, and cross-tenant identities before mutating state.
    • Ensures rejected, repeated, expired, or failed operations leave no partial, unauthorized, or lingering execution state.
  3. State Transition & Concurrency Safety:

    • Cleanly resolves reducer duplicate submission handling and enforces idempotency with event trail preservation (\DUPLICATE_BLOCKED, \REVIEW_STARTED, \SUBMIT_ATTEMPTED, \SUBMIT_SUCCEEDED).
    • Fixes test fixtures and mocks to guarantee resilient client and UI behavior.

Verification


  • pm run build\ (
    ext build): Built production bundle with 0 errors.

  • px vitest run: 9/9 test files passed (136/136 tests green).

Closes #1653, Closes #1650

@0dillon
0dillon force-pushed the feat/transfer-precision-auth-boundaries branch from e48d47a to 257d09e Compare September 1, 2026 08:06
@0dillon 0dillon changed the title Fix transfer precision and auth boundaries fix(transfer): enforce transfer precision, authorization boundaries, and state-transition invariants Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant