but src/popup/views/addToken.js:24 calls showView("add-token"). showView
is not in scope and there is no global, so show() throws a ReferenceError
every single time.
Effect: clicking "+ Token" on AddressDetail does nothing visible, and it
corrupts the navigation stack — pushCurrentView() in src/popup/index.js:76-79 has already pushed "address" before the throw, so
the user's subsequent "Back" behaviour is wrong.
This makes the AddToken screen documented at README.md:489-501 and the
"Adding ERC-20 Tokens" flow in docs/README.md completely unreachable. The
only working add-token path today is Settings -> SettingsAddToken.
Regression introduced by a22f33d ("fix: implement proper view navigation
stack (#146)"), which rewrote the import from { $, showView, showFlash } to { $, showFlash, goBack }.
Implementation requirements
Add showView back to the destructured import in addToken.js:1. Verify
against src/popup/views/helpers.js that showView is exported and that goBack/showFlash are genuinely still used in this module; drop any that
are not rather than leaving unused imports behind.
Confirm the nav-stack interaction is correct after the fix: entering
AddToken from AddressDetail and pressing "Back" must return to
AddressDetail exactly once, with no stale entry left on the stack.
Do not paper over this with a try/catch or a global.
This bug and #(TransactionDetail ERC-20 crash) are the same class of defect
(used-but-not-imported) and are invisible to make check because script/lint is only prettier --check. The systemic fix is tracked
separately as the ESLint issue; this issue is the point fix only.
Definition of done
"+ Token" on AddressDetail opens the AddToken screen.
The common-token quick-pick buttons populate the contract address field.
Adding a token by contract address returns to AddressDetail and the
token appears in the balance list.
"Back" from AddToken returns to AddressDetail, and a second "Back"
returns to Home (no duplicated or orphaned stack entry).
A regression test covers this. Since the views are currently untestable
(no jsdom environment configured), either add the jsdom test env and a
test that addToken.show() does not throw, or — if that proves
disproportionate — state in the PR why, and ensure the ESLint issue will
catch the class instead.
TODO.md updated in the same commit.
make check passes.
## Problem
`src/popup/views/addToken.js:1` imports:
```js
const { $, showFlash, goBack } = require("./helpers");
```
but `src/popup/views/addToken.js:24` calls `showView("add-token")`. `showView`
is not in scope and there is no global, so `show()` throws a `ReferenceError`
every single time.
Effect: clicking "+ Token" on AddressDetail does nothing visible, **and it
corrupts the navigation stack** — `pushCurrentView()` in
`src/popup/index.js:76-79` has already pushed `"address"` before the throw, so
the user's subsequent "Back" behaviour is wrong.
This makes the AddToken screen documented at `README.md:489-501` and the
"Adding ERC-20 Tokens" flow in `docs/README.md` completely unreachable. The
only working add-token path today is Settings -> SettingsAddToken.
Regression introduced by `a22f33d` ("fix: implement proper view navigation
stack (#146)"), which rewrote the import from `{ $, showView, showFlash }` to
`{ $, showFlash, goBack }`.
## Implementation requirements
- Add `showView` back to the destructured import in `addToken.js:1`. Verify
against `src/popup/views/helpers.js` that `showView` is exported and that
`goBack`/`showFlash` are genuinely still used in this module; drop any that
are not rather than leaving unused imports behind.
- Confirm the nav-stack interaction is correct after the fix: entering
AddToken from AddressDetail and pressing "Back" must return to
AddressDetail exactly once, with no stale entry left on the stack.
- Do not paper over this with a `try/catch` or a global.
- This bug and #(TransactionDetail ERC-20 crash) are the same class of defect
(used-but-not-imported) and are invisible to `make check` because
`script/lint` is only `prettier --check`. The systemic fix is tracked
separately as the ESLint issue; this issue is the point fix only.
## Definition of done
- [ ] "+ Token" on AddressDetail opens the AddToken screen.
- [ ] The common-token quick-pick buttons populate the contract address field.
- [ ] Adding a token by contract address returns to AddressDetail and the
token appears in the balance list.
- [ ] "Back" from AddToken returns to AddressDetail, and a second "Back"
returns to Home (no duplicated or orphaned stack entry).
- [ ] A regression test covers this. Since the views are currently untestable
(no jsdom environment configured), either add the jsdom test env and a
test that `addToken.show()` does not throw, or — if that proves
disproportionate — state in the PR why, and ensure the ESLint issue will
catch the class instead.
- [ ] `TODO.md` updated in the same commit.
- [ ] `make check` passes.
clawbot
added this to the 1.0.0 milestone 2026-08-09 03:41:48 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
src/popup/views/addToken.js:1imports:but
src/popup/views/addToken.js:24callsshowView("add-token").showViewis not in scope and there is no global, so
show()throws aReferenceErrorevery single time.
Effect: clicking "+ Token" on AddressDetail does nothing visible, and it
corrupts the navigation stack —
pushCurrentView()insrc/popup/index.js:76-79has already pushed"address"before the throw, sothe user's subsequent "Back" behaviour is wrong.
This makes the AddToken screen documented at
README.md:489-501and the"Adding ERC-20 Tokens" flow in
docs/README.mdcompletely unreachable. Theonly working add-token path today is Settings -> SettingsAddToken.
Regression introduced by
a22f33d("fix: implement proper view navigationstack (#146)"), which rewrote the import from
{ $, showView, showFlash }to{ $, showFlash, goBack }.Implementation requirements
showViewback to the destructured import inaddToken.js:1. Verifyagainst
src/popup/views/helpers.jsthatshowViewis exported and thatgoBack/showFlashare genuinely still used in this module; drop any thatare not rather than leaving unused imports behind.
AddToken from AddressDetail and pressing "Back" must return to
AddressDetail exactly once, with no stale entry left on the stack.
try/catchor a global.(used-but-not-imported) and are invisible to
make checkbecausescript/lintis onlyprettier --check. The systemic fix is trackedseparately as the ESLint issue; this issue is the point fix only.
Definition of done
token appears in the balance list.
returns to Home (no duplicated or orphaned stack entry).
(no jsdom environment configured), either add the jsdom test env and a
test that
addToken.show()does not throw, or — if that provesdisproportionate — state in the PR why, and ensure the ESLint issue will
catch the class instead.
TODO.mdupdated in the same commit.make checkpasses.clawbot referenced this issue2026-08-10 15:49:44 +02:00