fix: read USD prices from Chainlink price feeds through the RPC endpoint (closes #525)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

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
This commit is contained in:
2026-10-27 02:49:24 +00:00
parent 53551c6382
commit 8ba30f873c
15 changed files with 796 additions and 123 deletions
+9 -16
View File
@@ -70,9 +70,9 @@ analytics, use a portfolio tracker. The wallet is not the place for any of that.
## How It Works
AutistMask is a browser extension that runs entirely in your browser. It does
not have a backend server. Out of the box it sends your data only to the
Ethereum RPC endpoint. It also asks the CoinDesk price API for prices, sending
token symbols and nothing else.
not have a backend server. Out of the box it contacts only the Ethereum RPC
endpoint. USD prices are read from Chainlink price feed contracts through that
endpoint.
Blockscout and Etherscan are sent none of your data until you turn on a setting
for each. The settings are "Use Blockscout" and "Check recipients on Etherscan".
@@ -89,10 +89,16 @@ verify confirmations. The default is a free public RPC endpoint. You can change
this in Settings to any Ethereum JSON-RPC endpoint, including your own local
node.
On mainnet, AutistMask also reads USD prices through this endpoint. The prices
come from Chainlink's price feed contracts. A token with no Chainlink feed shows
no USD value.
When it is contacted:
- on every balance refresh (every 10 seconds while the popup is open, every 60
seconds in the background)
- on mainnet, to read USD prices, at most every 5 minutes while the popup is
open
- when you review a send to an ENS name
- when a send is prepared and broadcast
- while a pending transaction is polled for its receipt
@@ -131,19 +137,6 @@ sends none of your data.
What gets sent: your Ethereum addresses (to look up balances and transactions)
and the hash of each transaction you open.
**CoinDesk CADLI price API** (`data-api.coindesk.com`)
Used to fetch current USD prices for ETH and the top 25 tokens. Prices are
cached for 5 minutes. No API key is required. This endpoint is not
user-configurable, and it is not contacted at all while you are on a testnet,
where no USD values are shown.
When it is contacted: while the popup is open, at most once every 5 minutes.
What gets sent: token symbol names (e.g. "ETH", "USDC"). No addresses, no
balances, no identifying information. As with any request, CoinDesk sees your IP
address.
**Etherscan address labels** (`etherscan.io`; `sepolia.etherscan.io` on Sepolia)
While "Check recipients on Etherscan" is on, AutistMask fetches the recipient's