Skip to content

feat: transaction feedback controller with duplicate submission prevention - #987

Closed
QueenGiba wants to merge 2 commits into
SO4-Markets:mainfrom
QueenGiba:feat/transaction-feedback-and-duplicate-prevention
Closed

QueenGiba wants to merge 2 commits into
SO4-Markets:mainfrom
QueenGiba:feat/transaction-feedback-and-duplicate-prevention

Conversation

@QueenGiba

Copy link
Copy Markdown
Contributor

Summary

#732 (OB-093) — Introduce useTxFeedback hook for explicit transaction lifecycle management:

  • Typed events (signing, submitted, confirmed, ordering, settled, error, unknown_outcome) eliminate English message matching.
  • Each transaction attempt gets a stable toast ID that persists across lifecycle updates.
  • Multiple concurrent transactions maintain separate identities without interference.
  • Integrates with existing custom toast implementation.

#733 (OB-078) — Add duplicate submission prevention to useTxSubmit:

  • Guard against double-click, Enter+click, and component rerender via submitInProgress flag.
  • Track attempt identity to correlate submissions with hash and status lookups.
  • Detect unknown submission outcomes and signal for status lookup by hash.
  • Request new signature only after explicit user retry, never automatic retry.

Implementation

  • New useTxFeedback hook in apps/web/src/shared/hooks/useTxFeedback.tsx manages transaction state and toast updates.
  • Extended useTxSubmit with submitWithFeedback() method for order book flows while keeping submit() for backward compatibility.
  • Attempt tracking prevents duplicate submissions during provider timeouts or component rerender.

Closes #732
Closes #733

- SO4-Markets#824: Fix import order in TVChartContainer, DepthLadder, ConfirmationDialog.
  External/builtin imports precede internal/relative imports; type imports
  follow value imports. Remove unnecessary nullish coalescing in DepthLadder
  (line 222) and ConfirmationDialog (lines 135-136). Remove unnecessary
  type assertion in useSourceFreshness.test.ts (line 152).

- SO4-Markets#823: Add `test` and `test:coverage` scripts to apps/web/package.json
  so that turbo test and CI properly run the web test suite.

Closes SO4-Markets#824
Closes SO4-Markets#823
…sion prevention

- SO4-Markets#732 (OB-093): Create useTxFeedback hook to manage transaction lifecycle
  with typed events (signing, submitted, confirmed, ordering, settled, error,
  unknown_outcome). Each transaction attempt gets a stable toast ID that is
  updated across lifecycle stages without relying on English message matching.
  Multiple concurrent transactions maintain separate identities.

- SO4-Markets#733 (OB-078): Add duplicate submission prevention to useTxSubmit:
  - Guard against double-click, Enter+click, component rerender via submitInProgress flag
  - Track attempt identity to correlate submission with hash/status lookup
  - Detect unknown submission outcomes and signal for status lookup by hash
  - Only request new signature after explicit user retry, not automatic

- Extend useTxSubmit to export submitWithFeedback() for order book and
  trading flows, while keeping submit() for backward compatibility.

Closes SO4-Markets#732
Closes SO4-Markets#733
@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@QueenGiba is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@QueenGiba 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

@QueenGiba

Copy link
Copy Markdown
Contributor Author

Consolidated into #988

@QueenGiba QueenGiba closed this Oct 17, 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

Development

Successfully merging this pull request may close these issues.

OB-078: Prevent duplicate submission and unsafe automatic retries OB-093: Introduce a transaction feedback controller with stable toast IDs

1 participant