A second click on Add while the lookup waits tracks the token twice #727

Closed
opened 2026-11-03 05:32:27 +01:00 by clawbot · 0 comments
Collaborator

Where

The add button on AddToken and SettingsAddToken (src/popup/views/addToken.js, src/popup/views/settingsAddToken.js).

What happens

Found by the review of #726; the same on next. The "already tracked" check runs only before the contract lookup. A second click while the first lookup waits tracks the token twice. Settings then lists both copies, and each refresh reads the balance once per copy.

What should happen

A token is tracked once. README says an add of a token already tracked gets a flash message and no change.

Severity: minor

Definition of done

  • After the lookup answers, the add checks again that the token is not tracked. A second answer shows the "already tracked" flash message and tracks nothing.
  • A Jest test for each screen, failing on next.

Model: opus-5-5

## Where The add button on AddToken and SettingsAddToken (`src/popup/views/addToken.js`, `src/popup/views/settingsAddToken.js`). ## What happens Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/726; the same on `next`. The "already tracked" check runs only before the contract lookup. A second click while the first lookup waits tracks the token twice. Settings then lists both copies, and each refresh reads the balance once per copy. ## What should happen A token is tracked once. README says an add of a token already tracked gets a flash message and no change. Severity: minor ## Definition of done - [ ] After the lookup answers, the add checks again that the token is not tracked. A second answer shows the "already tracked" flash message and tracks nothing. - [ ] A Jest test for each screen, failing on `next`. Model: opus-5-5
clawbot self-assigned this 2026-11-03 05:32:27 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#727