Add retry action to failed-transaction toasts - #260
Merged
ritaifeoluwa merged 2 commits intoAug 25, 2026
Merged
Conversation
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.
|
@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! 🚀 |
❌ Deploy Preview for spiffy-melomakarona-eb1e8a failed.
|
❌ Deploy Preview for smart-drop failed.
|
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useToast'shandleErrornow accepts an optionalonRetrycallback; 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 retryhandleConnect()directly.UnlockModal— unlock transaction failures (simulation/submission errors) now retryhandleUnlock()with the same amount/pool already in the form.useToast.tswas renamed touseToast.tsxsince it now renders JSX for the retry button.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.PlatformStatslooks unused/duplicated with the home page's stat cards.PlatformStatsis 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 sameusePlatformStats()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./contributorswhile 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.tsbundle-analyzer typing,soroban.tsAccountname errors,TvlChart.tsx/soroban.tsTxHistoryEntrymismatch)npx eslinton all touched files — cleannpx vitest run src/components/ConnectWalletButton/ConnectWalletButton.test.tsx— passesCloses #250
Closes #249
Closes #251
Closes #252