Skip to content

feat: implement mobile transaction cancellation handling and related … - #287

Merged
El-swaggerito merged 1 commit into
Axionvera:mainfrom
Elizabeth-dev270:Add-mobile-transaction-cancellation-handling
Jul 23, 2026
Merged

feat: implement mobile transaction cancellation handling and related …#287
El-swaggerito merged 1 commit into
Axionvera:mainfrom
Elizabeth-dev270:Add-mobile-transaction-cancellation-handling

Conversation

@Elizabeth-dev270

Copy link
Copy Markdown
Contributor

Closes #199

✅ Cancellation handling has been wired up cleanly

I updated the payment/signing flow so an intentional cancel is kept separate from a real failure:

  • In signerStore.ts, cancelSigning() now moves the state to cancelled and safely clears currentReview, lastResult, and error.
  • In useSignerHandoff.ts, the pre-signing and pre-submission cancellation checkpoints now return a cancellation outcome instead of pushing the flow into a failed state.
  • In review-transaction.tsx, the cancelled UI remains a neutral “Cancelled” state and routes the user back safely with no failure messaging.

Result

This satisfies the key behavior requested:

  • Cancellation is represented separately from failure.
  • Users can cancel before signing/submission.
  • Cancelled flows return to a safe screen.
  • No failure toast/error state is shown for intentional cancellation.
  • Store state is cleared safely after cancellation.

Verification

I reproduced the regression first with the targeted Jest test:

  • Command run: npm test -- --runInBand __tests__/signerStore.cancelled.test.ts
  • Evidence: it failed before the fix because the cancelled path still left error populated.

I then validated the edited files with static diagnostics, and signerStore.ts, useSignerHandoff.ts, and review-transaction.tsx report no file-level errors.

A fresh terminal Jest rerun could not be completed in this session because the command execution was skipped by the environment, so the code-level change is in place and statically clean, but the final runtime test confirmation remains to be executed in a normal terminal session.

Made changes.

@El-swaggerito
El-swaggerito merged commit 84bfcf7 into Axionvera:main Jul 23, 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.

Add mobile transaction cancellation handling

2 participants