chore: networks.js defines nativeCurrency and nothing reads it, so Sepolia balances and fees all read "ETH" #372

Closed
opened 2026-08-23 21:06:18 +02:00 by clawbot · 2 comments
Collaborator

Found by a deployability verification of next at 75a5fa9, by grep and by observation in a real browser.

src/shared/networks.js defines nativeCurrency (ETH / SepoliaETH) and nothing reads it — zero call sites. Every native-token label in the UI is a hardcoded "ETH", so on Sepolia the balance, the value and the fee all read ETH rather than SepoliaETH.

Cosmetic, but it is dead config that looks live: the next reader will reasonably assume the label is driven by that field and change it there, with no effect.

Checked and NOT a problem: the worse adjacent risk does not exist — getPrice() returns null on testnet, so testnet funds are never given a bogus USD value.

Definition of done

  • Either the native-token label is driven by nativeCurrency, or the field is removed. Do not leave config that nothing consumes.
  • If driven: a Sepolia balance, value and fee all read SepoliaETH, asserted by test.
  • make check green.
Found by a deployability verification of `next` at `75a5fa9`, by grep and by observation in a real browser. `src/shared/networks.js` defines `nativeCurrency` (`ETH` / `SepoliaETH`) and **nothing reads it** — zero call sites. Every native-token label in the UI is a hardcoded `"ETH"`, so on Sepolia the balance, the value and the fee all read `ETH` rather than `SepoliaETH`. Cosmetic, but it is dead config that looks live: the next reader will reasonably assume the label is driven by that field and change it there, with no effect. Checked and NOT a problem: the worse adjacent risk does not exist — `getPrice()` returns null on testnet, so testnet funds are never given a bogus USD value. ## Definition of done - [ ] Either the native-token label is driven by `nativeCurrency`, or the field is removed. Do not leave config that nothing consumes. - [ ] If driven: a Sepolia balance, value and fee all read `SepoliaETH`, asserted by test. - [ ] `make check` green.
clawbot added this to the 1.0.0 milestone 2026-09-21 09:19:59 +02:00
Author
Collaborator

Plan. One PR on a branch cut from next, base next.

  • Of the issue's two options, drive the label: every place that shows the native token's symbol (balances, value, fee, reserve, send and confirm screens, approval screens, history) reads it from the active network's nativeCurrency through one small helper, instead of a hardcoded "ETH". This holds whichever way #165 (Sepolia, the owner's decision) goes: on mainnet the label stays ETH.
  • Not touched: token symbols, and swap lines where ETH names the router's native-currency convention rather than the network's coin.
  • Tests: on Sepolia the balance, value and fee read SepoliaETH; on mainnet they still read ETH.

Model: opus-5-5

Plan. One PR on a branch cut from `next`, base `next`. - Of the issue's two options, drive the label: every place that shows the native token's symbol (balances, value, fee, reserve, send and confirm screens, approval screens, history) reads it from the active network's `nativeCurrency` through one small helper, instead of a hardcoded `"ETH"`. This holds whichever way https://git.eeqj.de/sneak/AutistMask/issues/165 (Sepolia, the owner's decision) goes: on mainnet the label stays `ETH`. - Not touched: token symbols, and swap lines where `ETH` names the router's native-currency convention rather than the network's coin. - Tests: on Sepolia the balance, value and fee read `SepoliaETH`; on mainnet they still read `ETH`. Model: opus-5-5
Author
Collaborator

Built in #442: the native token's label is now read from the active network's nativeCurrency, so on Sepolia the balance, value, fee and history read SepoliaETH; mainnet still reads ETH. The PR body lists the fixed wording left as ETH.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/AutistMask/pulls/442: the native token's label is now read from the active network's `nativeCurrency`, so on Sepolia the balance, value, fee and history read `SepoliaETH`; mainnet still reads `ETH`. The PR body lists the fixed wording left as `ETH`. 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#372