Skip to content

fix: add transaction feedback toasts and trade panel error boundary (… - #739

Merged
Chucks1093 merged 1 commit into
accesslayerorg:devfrom
Alaka-ibr:fix/issue-546-transaction-feedback-error-boundary
Jul 30, 2026
Merged

fix: add transaction feedback toasts and trade panel error boundary (…#739
Chucks1093 merged 1 commit into
accesslayerorg:devfrom
Alaka-ibr:fix/issue-546-transaction-feedback-error-boundary

Conversation

@Alaka-ibr

Copy link
Copy Markdown
Contributor

Description

Closes #546

This PR introduces visual transaction feedback toasts following confirmed buy and sell trades, and wraps the trade panel in a React Error Boundary to isolate render errors without crashing the surrounding page.

Changes Made

  • Transaction Success Toasts:

    • Displays Bought {n} key{s} from {creator} after a buy confirmation.
    • Displays Sold {n} key{s} from {creator} after a sell confirmation.
    • Formats quantity singular vs. plural appropriately (1 key vs 2 keys).
    • Configured success toasts to auto-dismiss after 4 seconds (4,000ms).
  • Trade Panel Error Boundary:

    • Created TradePanelErrorBoundary class component to catch unexpected render errors inside the trade dialog.
    • Displays an inline fallback UI with an error message and a Retry button.
    • Clicking Retry resets the error boundary state and remounts the trade panel cleanly.
    • Ensures header, creator grid, holdings overview, and timeline remain mounted and functional during a trade panel failure.
  • Tests:

    • Added unit test suite in TradePanelErrorBoundary.test.tsx covering normal child rendering, fallback UI on render error, layout isolation, and state reset on retry.
    • Updated integration tests in LandingPage.tradeConfirmToast.integration.test.tsx, LandingPage.buyFlowEndToEnd.integration.test.tsx, and LandingPage.sellFlow.integration.test.tsx to verify new toast messages and boundary behaviors.

How Has This Been Tested?

Ran local Vitest suite across target test files:

  • src/components/common/__tests__/TradePanelErrorBoundary.test.tsx
  • src/pages/__tests__/LandingPage.tradeConfirmToast.integration.test.tsx
  • src/pages/__tests__/LandingPage.buyFlowEndToEnd.integration.test.tsx
  • src/pages/__tests__/LandingPage.sellFlow.integration.test.tsx

All 13 unit and integration tests passed cleanly.

@Alaka-ibr

Copy link
Copy Markdown
Contributor Author

Done, please review.

@Chucks1093

Copy link
Copy Markdown
Contributor

Good work

@Chucks1093
Chucks1093 merged commit 9d14a3e into accesslayerorg:dev Jul 30, 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 transaction feedback system with success toasts and trade panel error boundary

2 participants