Repository navigation
Conversation
…to WalletMismatchBanner Enhance WalletMismatchBanner with bold badges displaying both the wallet's reported network and the app's active network, a "Switch App to Wallet Network" button that updates the app's active network setting when supported, and a "Re-check Connection" button that re-queries the connected wallet session. Fixes LabsCrypt#1642
This branch has not been deployed
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.
Description
Adds a "Switch App to Wallet Network" button, a "Re-check Connection" button, and clear bold network badges for both the wallet's reported network and the app's active network in
WalletMismatchBanner(frontend/src/components/wallet/WalletMismatchBanner.tsx).Type of Change
Related Issues
Closes #1642
Fixes #1642
/claim #1642
Changes Made
resolveSupportedNetworkIdinfrontend/src/components/wallet/WalletMismatchBanner.tsxto map wallet-reported network labels/passphrases to supported appNetworkIdvalues (mainnet,testnet,futurenet,sandbox).data-testid="wallet-network-badge") and the app's active network name (data-testid="app-network-badge") in bold<strong>badge elements inside therole="alert"banner.setNetworkId(targetNetworkId)when supported (and disables gracefully for unrecognized custom networks).connect(selectedWalletId ?? session.walletId)and dismisses the banner once the mismatch is resolved.frontend/src/components/wallet/WalletMismatchBanner.test.tsx.Testing
Test Coverage
Test Steps
npx vitest run src/components/wallet/WalletMismatchBanner.test.tsxinfrontend/(10/10 tests pass).npx tsc --noEmitinfrontend/(0 errors).npx eslint src/components/wallet/WalletMismatchBanner.tsx src/components/wallet/WalletMismatchBanner.test.tsxinfrontend/(0 errors, 0 warnings).Checklist
Additional Notes
Payout Details
0x9a51790aC01c54184bcFa067bC38f7F0E7C6F6B6