Skip to content

feat(send): prevent duplicate transfer submissions across retries and navigation - #294

Closed
woahwhattheheck wants to merge 2 commits into
RemitFlow:mainfrom
woahwhattheheck:feat/prevent-duplicate-transfer-submissions
Closed

woahwhattheheck wants to merge 2 commits into
RemitFlow:mainfrom
woahwhattheheck:feat/prevent-duplicate-transfer-submissions

Conversation

@woahwhattheheck

Copy link
Copy Markdown

Closes #277

Binds a canonical request fingerprint and idempotency key to the exact transfer payload so one user intent creates at most one transfer.

Design

  • fingerprintTransferPayload + idempotencyKeyFor derive a stable key from the transferable fields.
  • Only a safe operation reference (key, fingerprint, transfer id, status) is persisted in sessionStorage.
  • createTransfer returns the prior record when the same idempotency key is replayed.
  • Send Money restores in-flight intents after navigation/refresh without auto-resubmitting.
  • Editing the payload produces a new fingerprint and therefore a new intent.

Tests

  • Unit: fingerprint stability, key derivation, session op persistence, changed-payload new key.
  • Integration: double-confirm, refresh restore without second create, API-level same-key / new-key behaviour.

Compatibility

  • Additive: idempotencyKey is optional on the Transfer contract for legacy records.
  • No unrelated refactors.

Bind an idempotency key to the exact transfer payload, persist only a safe
operation reference in sessionStorage, and return the prior transfer on
repeated submits with the same key. Refresh restores in-flight status;
an edited payload mintes a new intent.

Closes RemitFlow#277
Prevent duplicate transfer submissions across double-clicks, retries,
refresh, and navigation by persisting a safe operation reference and
reconciling in-flight intents without auto-resubmitting.
@woahwhattheheck

Copy link
Copy Markdown
Author

Superseded by latch/remitflow-277-idempotent-send with stronger timeout/navigation coverage and corrected operation lifecycle statuses.

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.

feat(frontend): prevent duplicate transfer submissions across retries and navigation

1 participant