harden: debug mode logs only a request's origin and JSON-RPC method (closes #410)
With debug mode on, debugFetch logged every request's full URL and body, so an RPC endpoint with an API key in its path or query string printed that key to the console on every request. It now logs the HTTP method, the URL's origin and, for a JSON-RPC body, the method name. The balance refresh and token lookup, which logged the RPC URL at debug level, log its origin too. The error lines for failed RPC calls print ethers' short message, since its full message for an HTTP error carries the request URL. The README's DEBUG Mode Policy says what debug mode logs. Model: opus-5-5
This commit is contained in:
@@ -395,7 +395,7 @@ async function estimateGas(txInfo) {
|
||||
feeWei = gasCostWei;
|
||||
renderValidation(txInfo);
|
||||
} catch (e) {
|
||||
log.errorf("gas estimation failed:", e.message);
|
||||
log.errorf("gas estimation failed:", e.shortMessage || e.message);
|
||||
if (pendingTx !== txInfo) return;
|
||||
$("confirm-fee-amount").textContent = "Unable to estimate";
|
||||
setVisible("confirm-fee-reserve", false);
|
||||
|
||||
Reference in New Issue
Block a user