A Blockscout answer for one transaction can fill TransactionDetail for another #675

Closed
opened 2026-10-26 08:23:46 +01:00 by clawbot · 1 comment
Collaborator

Found by the review of #671.

Where

show() in src/popup/views/transactionDetail.js starts loadFullTxDetails(tx.hash, tx.chainId) without waiting for it. When Blockscout answers, loadFullTxDetails() fills the block, nonce, gas, fee, network and decoded-details fields without checking that TransactionDetail still shows that transaction.

What happens

Open TransactionDetail for one transaction, press Back, and open another before Blockscout has answered for the first. If the first answer lands after the second screen is drawn, the second transaction's screen shows the first one's block, fee and decoded details. If the second request fails, they stay there. Read from the code on next (c316d9e); not driven in a browser.

What should happen

TransactionDetail shows only details fetched for the transaction it is showing. An answer for any other transaction, or one that lands after the user left the screen, is dropped.

Severity: minor

Definition of done

  • An answer that lands after TransactionDetail moved to another transaction, or was left, changes nothing on screen.
  • A unit test opens two transactions in turn with the first answer delayed, and finds only the second's details; it fails on next.

Model: opus-5-5

Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/671. ## Where `show()` in `src/popup/views/transactionDetail.js` starts `loadFullTxDetails(tx.hash, tx.chainId)` without waiting for it. When Blockscout answers, `loadFullTxDetails()` fills the block, nonce, gas, fee, network and decoded-details fields without checking that TransactionDetail still shows that transaction. ## What happens Open TransactionDetail for one transaction, press Back, and open another before Blockscout has answered for the first. If the first answer lands after the second screen is drawn, the second transaction's screen shows the first one's block, fee and decoded details. If the second request fails, they stay there. Read from the code on `next` (c316d9e); not driven in a browser. ## What should happen TransactionDetail shows only details fetched for the transaction it is showing. An answer for any other transaction, or one that lands after the user left the screen, is dropped. Severity: minor ## Definition of done - [ ] An answer that lands after TransactionDetail moved to another transaction, or was left, changes nothing on screen. - [ ] A unit test opens two transactions in turn with the first answer delayed, and finds only the second's details; it fails on `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-26 08:23:46 +01:00
Author
Collaborator

Plan: one PR to next. loadFullTxDetails() in src/popup/views/transactionDetail.js remembers the transaction it was started for. When Blockscout answers, the answer is dropped unless TransactionDetail is still on screen for that same transaction. It sits beside the check that the "Use Blockscout" setting already makes on that answer. A Jest test opens two transactions in turn with the first answer delayed and finds only the second's details; it fails on next.

Model: opus-5-5

Plan: one PR to `next`. `loadFullTxDetails()` in `src/popup/views/transactionDetail.js` remembers the transaction it was started for. When Blockscout answers, the answer is dropped unless TransactionDetail is still on screen for that same transaction. It sits beside the check that the "Use Blockscout" setting already makes on that answer. A Jest test opens two transactions in turn with the first answer delayed and finds only the second's details; it fails on `next`. 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#675