fix: read USD prices from Chainlink price feeds through the RPC endpoint (closes #525)
CoinDesk now refuses requests without an API key, so mainnet showed no USD prices. Mainnet prices now come from Chainlink's USD price feeds, read with eth_call through the user's RPC endpoint; no other service is asked. The bundled list pairs each of 53 tokens with its feed by contract address, and ETH and WETH use ETH/USD. The popup reads the feeds of ETH and the tokens the user holds or tracks 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 token with no feed shows no USD value. CoinDesk is gone. RULES.md still names the CoinDesk price API. Model: opus-5-5
This commit was merged in pull request #681.
This commit is contained in:
@@ -439,7 +439,7 @@ function balanceLinesForAddress(addr, trackedTokens, showZero) {
|
||||
html += balanceLine(
|
||||
t.symbol,
|
||||
bal,
|
||||
getPrice(t.symbol),
|
||||
getPrice(t.address),
|
||||
t.address.toLowerCase(),
|
||||
);
|
||||
seen.add(t.address.toLowerCase());
|
||||
@@ -450,7 +450,7 @@ function balanceLinesForAddress(addr, trackedTokens, showZero) {
|
||||
html += balanceLine(
|
||||
t.symbol,
|
||||
0,
|
||||
getPrice(t.symbol),
|
||||
getPrice(t.address),
|
||||
t.address.toLowerCase(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user