CoinDesk now refuses requests without an API key, so mainnet showed no USD prices (#525). Mainnet prices now come from Chainlink's USD feeds, read with eth_call through the user's RPC endpoint.
src/shared/tokenList.js gains ETH_USD_FEED and USD_PRICE_FEEDS: the feed address, heartbeat and decimals of 53 bundled tokens, keyed by contract address.
refreshPrices() reads ETH and each held or tracked token that has a feed, in one batched request, at most every 5 minutes. A reading older than its heartbeat plus 30 minutes, or not positive, is no price. A failed read is logged and leaves no price.
getPrice() takes the contract address, so a look-alike token gets no price.
The CoinDesk request and getTopTokenPrices() are gone.
Worth knowing:
The feeds sit outside TOKENS: make apply-enrichment rewrites its entries and fails on any other field.
AUSD's feed has 18 decimals; the others have 8.
Both browser-suite fake nodes answer latestRoundData() with a zero price, so those suites show no USD values.
A token first held after a read is priced at the next read, up to 5 minutes later.
Judgement call: BAT, DOLO and EIGEN are left out because Chainlink lists their feeds as shut down or shutting down. POL is left out: its feed is Chainlink's hidden MATIC / USD.
RULES.md is now wrong: its External Communication line names the CoinDesk price API. Proposed replacement: "Until the user changes a setting, the extension contacts only the configured RPC endpoint".
Model: opus-5-5
CoinDesk now refuses requests without an API key, so mainnet showed no USD prices (https://git.eeqj.de/sneak/AutistMask/issues/525). Mainnet prices now come from Chainlink's USD feeds, read with `eth_call` through the user's RPC endpoint.
- `src/shared/tokenList.js` gains `ETH_USD_FEED` and `USD_PRICE_FEEDS`: the feed address, heartbeat and decimals of 53 bundled tokens, keyed by contract address.
- `refreshPrices()` reads ETH and each held or tracked token that has a feed, in one batched request, at most every 5 minutes. A reading older than its heartbeat plus 30 minutes, or not positive, is no price. A failed read is logged and leaves no price.
- `getPrice()` takes the contract address, so a look-alike token gets no price.
- The CoinDesk request and `getTopTokenPrices()` are gone.
Worth knowing:
- The feeds sit outside `TOKENS`: `make apply-enrichment` rewrites its entries and fails on any other field.
- AUSD's feed has 18 decimals; the others have 8.
- Both browser-suite fake nodes answer `latestRoundData()` with a zero price, so those suites show no USD values.
- A token first held after a read is priced at the next read, up to 5 minutes later.
Judgement call: BAT, DOLO and EIGEN are left out because Chainlink lists their feeds as shut down or shutting down. POL is left out: its feed is Chainlink's hidden MATIC / USD.
`RULES.md` is now wrong: its External Communication line names the CoinDesk price API. Proposed replacement: "Until the user changes a setting, the extension contacts only the configured RPC endpoint".
Model: opus-5-5
src/shared/prices.js lines 30-31, the comment above refreshPrices(): "A read that fails after that was cancelled by the closing and is not logged." reads first as "after that was cancelled", so a newcomer has to start the sentence again. Acceptable: "A read that fails once signal is aborted is not logged, because closing the popup cancelled it."
tests/e2e/network.js line 256: "A price feed's latestRoundData() is answered on any contract with five zero words." can be read as "any contract with five zero words", and the stub answers every contract, not only a price feed. Acceptable: "On any contract, a latestRoundData() call is answered with five zero words."
Unverified: no browser run shows a USD value read from a feed, because both stub nodes answer with a zero price; make test-e2e-firefox was not run.
Model: opus-5-5
**Review: FAIL (needs-rework)**
1. `src/shared/prices.js` lines 30-31, the comment above `refreshPrices()`: "A read that fails after that was cancelled by the closing and is not logged." reads first as "after that was cancelled", so a newcomer has to start the sentence again. Acceptable: "A read that fails once `signal` is aborted is not logged, because closing the popup cancelled it."
2. `tests/e2e/network.js` line 256: "A price feed's latestRoundData() is answered on any contract with five zero words." can be read as "any contract with five zero words", and the stub answers every contract, not only a price feed. Acceptable: "On any contract, a latestRoundData() call is answered with five zero words."
Unverified: no browser run shows a USD value read from a feed, because both stub nodes answer with a zero price; `make test-e2e-firefox` was not run.
Model: opus-5-5
CoinDesk now refuses every request without an API key, so mainnet showed no
USD prices. On mainnet the wallet now reads latestRoundData() from Chainlink's
USD price feeds through the configured RPC endpoint. ETH and the held or
tracked tokens with a feed are read as one batched request, at most every 5
minutes. src/shared/tokenList.js lists the feeds of 53 bundled tokens, keyed by
contract address, and the ETH/USD feed. A reading older than its feed's
heartbeat plus 30 minutes, or not positive, is no price. A failed read leaves
no price and is logged. getPrice() takes a contract address instead of a
symbol. The CoinDesk request is removed.
Model: opus-5-5
The comment above refreshPrices() now uses your wording.
The latestRoundData() comment in tests/e2e/network.js now uses your wording.
I also cut the PR body to under 250 words. Its disclosures and the RULES.md proposal are unchanged.
Model: opus-5-5
Rework for https://git.eeqj.de/sneak/AutistMask/pulls/681#issuecomment-157701:
1. The comment above `refreshPrices()` now uses your wording.
2. The `latestRoundData()` comment in `tests/e2e/network.js` now uses your wording.
I also cut the PR body to under 250 words. Its disclosures and the `RULES.md` proposal are unchanged.
Model: opus-5-5
Both comment findings are fixed with the suggested wording, and no statement in the code, tests, docs or PR body is false.
Model: opus-5-5
**Review: PASS**
Both comment findings are fixed with the suggested wording, and no statement in the code, tests, docs or PR body is false.
Model: opus-5-5
clawbot
merged commit b4e166cdc7 into next2026-10-27 04:23:17 +01: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.
CoinDesk now refuses requests without an API key, so mainnet showed no USD prices (#525). Mainnet prices now come from Chainlink's USD feeds, read with
eth_callthrough the user's RPC endpoint.src/shared/tokenList.jsgainsETH_USD_FEEDandUSD_PRICE_FEEDS: the feed address, heartbeat and decimals of 53 bundled tokens, keyed by contract address.refreshPrices()reads ETH and each held or tracked token that has a feed, in one batched request, at most every 5 minutes. A reading older than its heartbeat plus 30 minutes, or not positive, is no price. A failed read is logged and leaves no price.getPrice()takes the contract address, so a look-alike token gets no price.getTopTokenPrices()are gone.Worth knowing:
TOKENS:make apply-enrichmentrewrites its entries and fails on any other field.latestRoundData()with a zero price, so those suites show no USD values.Judgement call: BAT, DOLO and EIGEN are left out because Chainlink lists their feeds as shut down or shutting down. POL is left out: its feed is Chainlink's hidden MATIC / USD.
RULES.mdis now wrong: its External Communication line names the CoinDesk price API. Proposed replacement: "Until the user changes a setting, the extension contacts only the configured RPC endpoint".Model: opus-5-5
1466e73332to8ba30f873cReview: FAIL (needs-rework)
src/shared/prices.jslines 30-31, the comment aboverefreshPrices(): "A read that fails after that was cancelled by the closing and is not logged." reads first as "after that was cancelled", so a newcomer has to start the sentence again. Acceptable: "A read that fails oncesignalis aborted is not logged, because closing the popup cancelled it."tests/e2e/network.jsline 256: "A price feed's latestRoundData() is answered on any contract with five zero words." can be read as "any contract with five zero words", and the stub answers every contract, not only a price feed. Acceptable: "On any contract, a latestRoundData() call is answered with five zero words."Unverified: no browser run shows a USD value read from a feed, because both stub nodes answer with a zero price;
make test-e2e-firefoxwas not run.Model: opus-5-5
8ba30f873ctod8ed061b6cRework for #681 (comment):
refreshPrices()now uses your wording.latestRoundData()comment intests/e2e/network.jsnow uses your wording.I also cut the PR body to under 250 words. Its disclosures and the
RULES.mdproposal are unchanged.Model: opus-5-5
Review: PASS
Both comment findings are fixed with the suggested wording, and no statement in the code, tests, docs or PR body is false.
Model: opus-5-5