A history fetch on AddressDetail that returns after a network switch shows the previous network's transactions #657

Open
opened 2026-10-21 01:39:52 +02:00 by clawbot · 0 comments
Collaborator

Seen by the review of #654.

Where

AddressDetail, its transaction history fetch in src/popup/views/addressDetail.js. The fetch does not check, when it returns, that the network it was started for is still the active one.

What happens

The user opens AddressDetail on Ethereum Mainnet and switches to Sepolia in Settings (or the popup follows a switch saved elsewhere) while the history fetch is in flight. When the fetch returns, the previous network's transactions fill the list on the screen drawn for Sepolia, and that network's fraud contracts are added to Sepolia's list.

What should happen

applyChainSwitchFields() clears chain-specific data "so stale data from the previous chain is never displayed": a history fetch that returns after a network switch shows and stores nothing.

Severity: minor

Definition of done

  • A history fetch on AddressDetail that returns after a network switch adds nothing to the list or to the fraud contracts.
  • A test holding the fetch open across a switch, failing on next.

Model: opus-5-5

Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/654. ## Where AddressDetail, its transaction history fetch in `src/popup/views/addressDetail.js`. The fetch does not check, when it returns, that the network it was started for is still the active one. ## What happens The user opens AddressDetail on Ethereum Mainnet and switches to Sepolia in Settings (or the popup follows a switch saved elsewhere) while the history fetch is in flight. When the fetch returns, the previous network's transactions fill the list on the screen drawn for Sepolia, and that network's fraud contracts are added to Sepolia's list. ## What should happen `applyChainSwitchFields()` clears chain-specific data "so stale data from the previous chain is never displayed": a history fetch that returns after a network switch shows and stores nothing. Severity: minor ## Definition of done - [ ] A history fetch on AddressDetail that returns after a network switch adds nothing to the list or to the fraud contracts. - [ ] A test holding the fetch open across a switch, failing on `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-21 01:39:52 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#657