A tracked token that the spoof rule drops still shows a zero row #705

Closed
opened 2026-10-27 21:29:34 +01:00 by clawbot · 2 comments
Collaborator

The add-token screens (addToken.js, settingsAddToken.js) do not apply the spoof rule, so the user can track a token that the rule treats as a spoof. refreshBalances() then drops it, but while "Show tracked tokens with zero balance" is on, balanceLinesForAddress() in src/popup/views/helpers.js still lists it with a zero balance. The README's "always dropped, tracked or not" says otherwise.

Found while reviewing #703; the same on next.

Definition of done: a token the spoof rule treats as a spoof never shows in the balance list, whatever the settings, and the add-token screens either refuse it with a message or track it knowing it will not show. A Jest test covers the zero-balance case. The README says what the code does.

Model: opus-5-5

The add-token screens (`addToken.js`, `settingsAddToken.js`) do not apply the spoof rule, so the user can track a token that the rule treats as a spoof. `refreshBalances()` then drops it, but while "Show tracked tokens with zero balance" is on, `balanceLinesForAddress()` in `src/popup/views/helpers.js` still lists it with a zero balance. The README's "always dropped, tracked or not" says otherwise. Found while reviewing https://git.eeqj.de/sneak/AutistMask/pulls/703; the same on `next`. Definition of done: a token the spoof rule treats as a spoof never shows in the balance list, whatever the settings, and the add-token screens either refuse it with a message or track it knowing it will not show. A Jest test covers the zero-balance case. The README says what the code does. Model: opus-5-5
clawbot self-assigned this 2026-10-27 21:29:34 +01:00
Author
Collaborator

Waits for #703, which is paused for review and changes the same spoof-rule calls and README paragraph; started once that PR is settled.

Model: opus-5-5

Waits for https://git.eeqj.de/sneak/AutistMask/pulls/703, which is paused for review and changes the same spoof-rule calls and README paragraph; started once that PR is settled. Model: opus-5-5
Author
Collaborator

Plan, replacing the wait recorded above: #703 is paused for the owner's review, so this goes ahead on next now. One PR to next. balanceLinesForAddress() in src/popup/views/helpers.js applies the spoof rule to tracked tokens with a zero balance as it does to the rest, so a token the rule treats as a spoof never shows in the balance list, whatever the settings. AddToken and SettingsAddToken refuse such a token with a flash message saying why, before tracking it. The README's sentence on this matches the code. Jest tests cover the zero-balance case and the refusal; each fails on next. PR 703, when it resumes, rebases over this.

Model: opus-5-5

Plan, replacing the wait recorded above: https://git.eeqj.de/sneak/AutistMask/pulls/703 is paused for the owner's review, so this goes ahead on `next` now. One PR to `next`. `balanceLinesForAddress()` in `src/popup/views/helpers.js` applies the spoof rule to tracked tokens with a zero balance as it does to the rest, so a token the rule treats as a spoof never shows in the balance list, whatever the settings. AddToken and SettingsAddToken refuse such a token with a flash message saying why, before tracking it. The README's sentence on this matches the code. Jest tests cover the zero-balance case and the refusal; each fails on `next`. PR 703, when it resumes, rebases over this. 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#705