Skip to content

feat(wallet): add reconnect prompt with persisted last-used provider#676

Merged
Junirezz merged 1 commit into
Junirezz:mainfrom
Codekill33:main
Jun 1, 2026
Merged

feat(wallet): add reconnect prompt with persisted last-used provider#676
Junirezz merged 1 commit into
Junirezz:mainfrom
Codekill33:main

Conversation

@Codekill33
Copy link
Copy Markdown
Contributor

Summary
Returning users currently land on a disconnected state with no guidance on how to reconnect quickly. This PR introduces a lightweight reconnect prompt that reads the last-used wallet provider from localStorage, validates it is still available in the injected provider list, and surfaces a one-click reconnect banner on app load. Dismissed state is tracked per session so the prompt does not reappear on the same visit after the user manually closes it.

Changes
Persist last-used provider key to
localStorage
on successful wallet connection
Read and validate persisted provider against currently injected providers on app load
Show
ReconnectPrompt
banner when disconnected and a valid last-used provider exists
Graceful fallback to full wallet selector when provider is unavailable or uninstalled
Track dismiss state in
sessionStorage
— prompt does not re-show after dismissal within the same tab session
Files changed
src/hooks/useWalletPersistence.ts
new
src/components/ReconnectPrompt.tsx
new
src/components/ReconnectPrompt.test.tsx
new
src/hooks/useWalletPersistence.test.ts
new
src/context/WalletContext.tsx
modified
src/App.tsx
modified

Testing
Prompt appears when disconnected and a valid provider is stored
Prompt does not appear when no provider is persisted
Prompt does not appear when stored provider is no longer injected
Dismiss hides prompt and sets session flag; prompt does not re-render on same session
Clicking reconnect triggers wallet connection with the stored provider
Fallback to full wallet selector renders correctly for unavailable provider

closes #487

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

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

@Junirezz Junirezz merged commit fa0414f into Junirezz:main Jun 1, 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.

Frontend: Add wallet reconnect prompt with persisted last-used provider

2 participants