After a network switch, Back shows the previous network's balances and tokens on the screen beneath Settings #576

Closed
opened 2026-10-19 02:51:19 +02:00 by clawbot · 1 comment
Collaborator

Seen by the review of #572.

Where

The Settings gear in the title bar opens Settings from any screen, and the network is switched there (src/popup/views/settings.js). Back then only unhides the screen beneath: src/popup/viewRouter.js draws again on Back only Home and a screen this page load never drew.

What happens

On AddressDetail, AddressToken or Send with Ethereum Mainnet active, press the gear, switch to Sepolia, press Back. The screen still shows the mainnet ETH balance, token balances and transactions, and Send's token selector still offers mainnet tokens, while the wallet is on Sepolia.

What should happen

applyChainSwitchFields() in src/shared/chainSwitchFields.js clears every address's balances on a switch "so stale data from the previous chain is never displayed". The screen Back lands on after a switch should show the active network's data.

Severity: minor

Definition of done

  • After a network switch, Back onto AddressDetail, AddressToken or Send shows only the active network's balances, tokens and transactions.
  • A test drives gear, switch, Back onto each of these screens.

Model: opus-5-5

Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/572. ## Where The Settings gear in the title bar opens Settings from any screen, and the network is switched there (`src/popup/views/settings.js`). Back then only unhides the screen beneath: `src/popup/viewRouter.js` draws again on Back only Home and a screen this page load never drew. ## What happens On AddressDetail, AddressToken or Send with Ethereum Mainnet active, press the gear, switch to Sepolia, press Back. The screen still shows the mainnet ETH balance, token balances and transactions, and Send's token selector still offers mainnet tokens, while the wallet is on Sepolia. ## What should happen `applyChainSwitchFields()` in `src/shared/chainSwitchFields.js` clears every address's balances on a switch "so stale data from the previous chain is never displayed". The screen Back lands on after a switch should show the active network's data. Severity: minor ## Definition of done - [ ] After a network switch, Back onto AddressDetail, AddressToken or Send shows only the active network's balances, tokens and transactions. - [ ] A test drives gear, switch, Back onto each of these screens. Model: opus-5-5
clawbot self-assigned this 2026-10-19 02:51:19 +02:00
Author
Collaborator

Fixed on next by #572 (commit 9c67e87), after this issue was filed from its review: after a switch from the Settings gear, Back renders the screen it lands on again for the new network, and cuts the stack at Send and at AddressToken for any token but the native one, landing on AddressDetail. The tests "Back after a switch from the Settings gear" in tests/trackedTokensPerNetwork.test.js drive gear, switch and Back onto each of these screens.

Model: opus-5-5

Fixed on `next` by https://git.eeqj.de/sneak/AutistMask/pulls/572 (commit `9c67e87`), after this issue was filed from its review: after a switch from the Settings gear, Back renders the screen it lands on again for the new network, and cuts the stack at Send and at AddressToken for any token but the native one, landing on AddressDetail. The tests "Back after a switch from the Settings gear" in `tests/trackedTokensPerNetwork.test.js` drive gear, switch and Back onto each of these screens. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#576