After Back from AddressToken, Send uses that token and ignores the dropdown #751

Closed
opened 2026-11-03 14:31:43 +01:00 by clawbot · 0 comments
Collaborator

Where

state.selectedToken, src/popup/views/send.js (state.selectedToken || $("send-token").value), and the "Back" button of AddressToken (src/popup/views/addressToken.js).

What happens

Found by the review of #749; the same on next. The balance line was run; "Review" was read from the code.

The user opens AddressDetail, taps a token to open AddressToken, taps "Back", and taps "Send". state.selectedToken is still set, because "Back" does not draw AddressDetail again. Send shows the token dropdown, but the balance line, "Max" and "Review" all use the token from AddressToken. The user picks ETH in the dropdown, and the transaction under review is of the other token. ConfirmTx does name the token. Receive reads the same field and can warn about the wrong token.

What should happen

The token the screen shows is the token that is sent.

Severity: major

Definition of done

  • Leaving AddressToken with "Back" clears state.selectedToken, so AddressDetail, Send and Receive start with none.
  • Jest tests, each failing on next: that path, then choosing ETH on Send, reviews ETH; that path to Receive shows no token warning.
  • Opening Send from AddressToken still sends that token.

Model: opus-5-5

## Where `state.selectedToken`, `src/popup/views/send.js` (`state.selectedToken || $("send-token").value`), and the "Back" button of AddressToken (`src/popup/views/addressToken.js`). ## What happens Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/749; the same on `next`. The balance line was run; "Review" was read from the code. The user opens AddressDetail, taps a token to open AddressToken, taps "Back", and taps "Send". `state.selectedToken` is still set, because "Back" does not draw AddressDetail again. Send shows the token dropdown, but the balance line, "Max" and "Review" all use the token from AddressToken. The user picks ETH in the dropdown, and the transaction under review is of the other token. ConfirmTx does name the token. Receive reads the same field and can warn about the wrong token. ## What should happen The token the screen shows is the token that is sent. Severity: major ## Definition of done - [ ] Leaving AddressToken with "Back" clears `state.selectedToken`, so AddressDetail, Send and Receive start with none. - [ ] Jest tests, each failing on `next`: that path, then choosing ETH on Send, reviews ETH; that path to Receive shows no token warning. - [ ] Opening Send from AddressToken still sends that token. Model: opus-5-5
clawbot self-assigned this 2026-11-03 14:31:43 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#751