fix(sponsor-wallet): align live error status, cross-tab wallet logout and address reconciliation (#269, #270, #283) - #296
Open
ghzhost wants to merge 1 commit into
Conversation
… and address reconciliation (MergeFi#269, MergeFi#270, MergeFi#283)
|
Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
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 of Changes
This PR resolves three interconnected sponsor and wallet UX/consistency issues:
Sponsor Dashboard Live Error Handling (SponsorDashboardPage sets isLive(false) on a genuine fetch error, showing a misleading "Demo data" badge and "sign in with GitHub" prompt to an already-signed-in sponsor #269):
src/app/dashboard/sponsor/page.tsx, setsetIsLive(true)on API fetch failure matchingContributorDashboardPageso signed-in sponsors seeing a live network failure are not incorrectly shown "Demo data" / "Sign in with GitHub".Cross-Tab Wallet State Cleanup on Logout (WalletContext never reacts to a cross-tab logout, so a wallet stays shown as "connected" and usable in a tab where the user was just signed out from another tab #270):
src/context/WalletContext.tsx, added a cleanup effect that invokesdisconnect()whenuserbecomes null while a local address remains connected, ensuring signed-out states immediately clear stored wallet credentials across sessions and tabs.Stellar Address Mismatch Warning Affordance (Nothing reconciles WalletContext's connected address against AuthUser.stellarAddress, so the UI can show a wallet as "connected" that differs from the actual payout address on file #283):
src/app/connect/ConnectPanel.tsx, added address reconciliation between the connected browser wallet (WalletContext.address) and registered payout address (AuthUser.stellarAddress), displaying an accessible contextual warning when they differ.Closes #269
Closes #270
Closes #283