All checks were successful
check / check (push) Successful in 14s
Major changes: - Fetch token balances and tx history from Blockscout API (configurable) - Remove manual token discovery (discoverTokens) in favor of Blockscout - HD address gap scanning on mnemonic import - Duplicate mnemonic detection on wallet add - EIP-6963 multi-wallet discovery + selectedAddress updates in inpage - Two-tier balance refresh: 10s while popup open, 60s background - Fix $0.00 flash before prices load (return null when no prices) - No-layout-shift: min-height on total value element - Aligned balance columns (42ch address width, consistent USD column) - All errors use flash messages instead of off-screen error divs - Settings gear in global title bar, add-wallet moved to settings pane - Settings wells with light grey background, configurable Blockscout URL - Consistent "< Back" buttons top-left on all views - Address titles (Address 1.1, 1.2, etc.) on main and detail views - Send view shows current balance of selected asset - Clickable affordance policy added to README - Shortened mnemonic backup warning - Fix broken background script constant imports
31 lines
724 B
JavaScript
31 lines
724 B
JavaScript
// Leveled logger. Outputs to console with [AutistMask] prefix.
|
|
// Level is DEBUG when the DEBUG constant is true, INFO otherwise.
|
|
|
|
const { DEBUG } = require("./constants");
|
|
|
|
const LEVELS = { debug: 0, info: 1, warn: 2, error: 3 };
|
|
const threshold = DEBUG ? LEVELS.debug : LEVELS.info;
|
|
|
|
function emit(level, method, args) {
|
|
if (LEVELS[level] >= threshold) {
|
|
console[method]("[AutistMask]", ...args);
|
|
}
|
|
}
|
|
|
|
const log = {
|
|
debugf(...args) {
|
|
emit("debug", "log", args);
|
|
},
|
|
infof(...args) {
|
|
emit("info", "log", args);
|
|
},
|
|
warnf(...args) {
|
|
emit("warn", "warn", args);
|
|
},
|
|
errorf(...args) {
|
|
emit("error", "error", args);
|
|
},
|
|
};
|
|
|
|
module.exports = { log };
|