Skip to content

Unlock fee estimate, root loading state, global RPC-down banner (#240, #242, #248) - #259

Merged
ritaifeoluwa merged 3 commits into
SmartDropLabs:mainfrom
richardtoms100:fix/unlock-fee-history-pagination-boot-rpc-banner-240-248
Aug 25, 2026
Merged

Unlock fee estimate, root loading state, global RPC-down banner (#240, #242, #248)#259
ritaifeoluwa merged 3 commits into
SmartDropLabs:mainfrom
richardtoms100:fix/unlock-fee-history-pagination-boot-rpc-banner-240-248

Conversation

@richardtoms100

@richardtoms100 richardtoms100 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • UnlockModal doesn't show transaction fee estimate #240 — `UnlockModal` submitted unlock transactions with no fee estimate — users only found out the cost once Freighter's signing prompt appeared. Added `buildUnlockAssetsTransaction`/`simulateUnlockAssets` (mirroring the existing lock-side pair) and `useUnlockAssetsFeePreview` (mirroring `useLockAssetsFeePreview`'s debounced-simulation pattern), wired into the modal's existing amount-preview box.
  • No loading state on initial app boot #242 — Color-mode FOUC was already prevented by the existing `ColorModeScript` + `colorModeManager={localStorageManager}` setup, and font-load FOUT by `next/font`'s `display: "swap"` — both already correct, so no change was needed there. The one real gap: no Suspense fallback for the root segment. Added `app/loading.tsx` (Next.js's App Router convention), shown during initial boot / a slow route transition instead of a blank screen.
  • No toast or banner when Soroban RPC node is unreachable #248 — When the Soroban RPC is down, every page independently showed its own query error with no indication it's a shared, app-wide outage. Added `useRpcHealth` (a lightweight `getHealth()` poll, 30s interval) and `RpcUnreachableBanner`, mounted globally in `AppShell`, mirroring `NetworkMismatchBanner`'s sticky-alert pattern.

Already resolved on inspection

  • No transaction history pagination or infinite scroll #241 ("No transaction history pagination or infinite scroll") — `history/page.tsx` already has full client-side pagination: `PAGE_SIZE = 20`, `page` state, and working Prev/numbered/Next controls (confirmed rendered in the JSX, not just wired in state). The one real nuance: the underlying `getUserTransactionHistory` call still fetches the full history in one RPC event-scan and paginates client-side rather than lazily fetching per-page — worth a follow-up if history genuinely grows large for real users, but the issue's literal claim ("no pagination controls") doesn't hold. Left a comment on the issue.

Test plan

  • `npx tsc --noEmit` — no new type errors.
  • `npx eslint` on all touched files — clean.
  • `npx vitest run src/hooks/useSorobanQuery.test.ts` — 12/12 passing.

Closes #240
Closes #242
Closes #248
Closes #241

…#240)

UnlockModal submitted unlock transactions with no fee estimate — users
only found out the cost once Freighter's signing prompt appeared. Added
buildUnlockAssetsTransaction/simulateUnlockAssets (mirroring the existing
lock-side pair) and useUnlockAssetsFeePreview (mirroring
useLockAssetsFeePreview's debounced-simulation pattern), then wired the
result into the modal's existing amount-preview box next to "Estimated
receive"/"Remaining stake"/"New daily rate".
…pLabs#242)

Color-mode FOUC was already prevented by the existing ColorModeScript +
colorModeManager={localStorageManager} setup, and font-load FOUT by
next/font's display:"swap" — both already correct. The one real gap was
no Suspense fallback for the root segment: Next.js's app/loading.tsx
convention shows this while the initial app boot (or a slow route
transition) is in flight, instead of a blank screen.
…s#248)

When the RPC endpoint is down, every page independently showed its own
query error with no indication it's a shared, app-wide outage. Added
useRpcHealth (a lightweight getHealth() poll, 30s interval) and a
RpcUnreachableBanner mounted globally in AppShell, mirroring
NetworkMismatchBanner's sticky-alert pattern — one unified signal instead
of N independent, cryptic per-page errors.
@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@richardtoms100 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 07adca7
🔍 Latest deploy log https://app.netlify.com/projects/spiffy-melomakarona-eb1e8a/deploys/6a8e01dda2329d0007286f0c

@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for smart-drop failed.

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

@ritaifeoluwa
ritaifeoluwa merged commit 2ff075a 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