Skip to content

Add retry action to failed-transaction toasts - #260

Merged
ritaifeoluwa merged 2 commits into
SmartDropLabs:mainfrom
miraclesonly:fix/farm-lock-badge-retry-platformstats-249-252
Aug 25, 2026
Merged

Add retry action to failed-transaction toasts#260
ritaifeoluwa merged 2 commits into
SmartDropLabs:mainfrom
miraclesonly:fix/farm-lock-badge-retry-platformstats-249-252

Conversation

@miraclesonly

@miraclesonly miraclesonly commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • No retry or cancel button on failed transactions #250 (fixed): error toasts had no way to retry a failed action — the user had to dismiss the toast and manually re-trigger the whole flow (reopen a modal, re-enter an amount, click Connect again). useToast's handleError now accepts an optional onRetry callback; when passed, the toast renders an inline Retry button that closes the toast and re-invokes the same operation. Wired into the two most common failure points:
    • ConnectWalletButton — wallet connect failures (wrong network, rejected prompt, timeout) now retry handleConnect() directly.
    • UnlockModal — unlock transaction failures (simulation/submission errors) now retry handleUnlock() with the same amount/pool already in the form.
    • useToast.ts was renamed to useToast.tsx since it now renders JSX for the retry button.
  • Farm page pool cards don't show lock status for connected wallet #249 (already resolved, no code change): asked for farm pool cards to show whether the connected user has an active lock in that pool. This was already added in the prior "Unlock status" countdown box on FarmPoolRow (merged in Noindex legacy redirect, farm-list lock status, themed ErrorBoundary (#227, #234, #235) #247 as part of the App doesn't show time remaining on locked positions in farm list #234 fix). Verified it's present and left an explanatory comment on the issue.
  • PlatformStats component not used on home page #251 (investigated, no code change): asked why PlatformStats looks unused/duplicated with the home page's stat cards. PlatformStats is in fact used, on /farm (src/app/farm/page.tsx). The home page has its own separate stat-card UI (different metric set, framer-motion animation, gradient accent) built on the same usePlatformStats() hook, so there's no duplicate network fetch — React Query dedupes by query key. Merging the two into one shared component is a real design decision, not a soft fix, and forcing it here risked a visual regression on the most-viewed page. Left a comment explaining the trade-off instead.
  • No skeleton loading for contributors page #252 (not applicable, no code change): asked for a loading skeleton on /contributors while data loads. Contributor data is a static JSON import (@/data/contributors.json), not fetched at runtime, so there's no async loading phase to skeleton-ize. Left a comment explaining this.

Test plan

  • npx tsc --noEmit — no new errors beyond the pre-existing baseline (next.config.ts bundle-analyzer typing, soroban.ts Account name errors, TvlChart.tsx/soroban.ts TxHistoryEntry mismatch)
  • npx eslint on all touched files — clean
  • npx vitest run src/components/ConnectWalletButton/ConnectWalletButton.test.tsx — passes

Closes #250
Closes #249
Closes #251
Closes #252

Issue SmartDropLabs#250: failed transactions/actions only offered a dismiss on the
error toast, forcing users to manually re-trigger the flow from
scratch. handleError now accepts an optional onRetry callback and
renders it as an inline "Retry" button inside the toast when passed.
Renamed useToast.ts -> .tsx since it now renders JSX.
Issue SmartDropLabs#250: use the new onRetry toast action for the two most common
failure points users hit — wallet connect (wrong network, rejected
prompt, timeout) and unlock transaction submission (simulation/
submission errors). Both now let the user retry directly from the
error toast instead of restarting the flow manually.
@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

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

@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for spiffy-melomakarona-eb1e8a failed.

Name Link
🔨 Latest commit d471545
🔍 Latest deploy log https://app.netlify.com/projects/spiffy-melomakarona-eb1e8a/deploys/6a8e06cc7c7a690008daaf03

@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for smart-drop failed.

Name Link
🔨 Latest commit d471545
🔍 Latest deploy log https://app.netlify.com/projects/smart-drop/deploys/6a8e06cca7c6940008a4c585

@ritaifeoluwa
ritaifeoluwa merged commit 6b58728 into SmartDropLabs:main Aug 25, 2026
0 of 9 checks 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

2 participants