Skip to content

feat(deposit): add status check and persisted pending deposit - #1354

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
AugistineCreates:feat/deposit-reconciliation
Oct 21, 2026
Merged

greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
AugistineCreates:feat/deposit-reconciliation

Conversation

@AugistineCreates

Copy link
Copy Markdown
Contributor

Closes #1315

Summary

Resolves: Let users verify an unconfirmed deposit hash and recover the deposit modal.

When submitting a deposit times out or confirmation polling gives up, the modal previously locked into a permanent dead end with a disabled button and lost the hash across page reloads.

This PR adds:

  1. Status check function: Added checkDepositStatus(hash) to src/services/walletService.ts, querying Soroban RPC getTransaction(hash) and returning "SUCCESS" | "FAILED" | "NOT_FOUND" | "UNKNOWN".
  2. Session storage persistence: Stores { hash, amount, submittedAt, network, contractId } in sessionStorage under callora:deposit:pending (guarded with try/catch against private browsing exceptions). Clears the record on a definitive outcome (SUCCESS, FAILED, or NOT_FOUND past the validity window).
  3. Modal recovery flow:
    • Replaced disabled button with an enabled Check status action calling checkDepositStatus.
    • SUCCESS: moves to confirmed state, updates vault balance (setVaultBalance), and clears storage.
    • FAILED: moves to failed state with Retry deposit enabled, and clears storage.
    • NOT_FOUND after 120s validity window: treated as failed with Retry deposit unlocked, and clears storage.
    • NOT_FOUND inside 120s window / UNKNOWN: stays locked and displays remaining countdown seconds.
  4. Automatic check on load / open: Restores pending record for the active network/contract on initial load or modal open and executes an initial status check.
  5. Billing page banner: Displays "You have an unconfirmed deposit" with a Check status action outside the modal on /billing when the modal is closed.
  6. Accessibility: Live announcements (role="status", aria-live="polite", sr-only) announce status updates without repeating countdown announcements every second.
  7. Documentation: Updated the stage diagram and narrative in docs/Deposit-Flow.md and recorded the key in docs/localStorage-inventory.md.

Test Verification Output

1. TypeScript Verification

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@AugistineCreates Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me
greatest0fallt1me merged commit 527999d into CalloraOrg:main Oct 21, 2026
1 check 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.

Let users verify an unconfirmed deposit hash and recover the deposit modal

2 participants