Add debugFetch wrapper in log.js that logs method, URL, and body on request, and status code on response. Replace all fetch() calls across balances, transactions, tokens, background RPC proxy, and settings validation with debugFetch.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
// Source: Etherscan, CoinGecko, CoinMarketCap as of 2026-02-25.
|
||||
// Ordered by approximate market cap descending.
|
||||
|
||||
const { debugFetch } = require("./log");
|
||||
|
||||
const COINDESK_API = "https://data-api.coindesk.com/index/cc/v1/latest/tick";
|
||||
|
||||
const DEFAULT_TOKENS = [
|
||||
@@ -818,7 +820,7 @@ async function getTopTokenPrices(n) {
|
||||
"?market=cadli&instruments=" +
|
||||
instruments +
|
||||
"&apply_mapping=true";
|
||||
const resp = await fetch(url);
|
||||
const resp = await debugFetch(url);
|
||||
const json = await resp.json();
|
||||
const prices = {};
|
||||
for (const [instrument, data] of Object.entries(json.Data || {})) {
|
||||
|
||||
Reference in New Issue
Block a user