Fixes#22: ENS reverse lookups appearing broken — addresses show bare hex even when they have a .eth reverse.
Root Cause
Two issues that could cause ENS names to disappear:
refreshBalances (balances.js): On ENS lookup error (timeout, RPC failure, etc.), addr.ensName was set to null, wiping any previously resolved name. Since saveState() runs after refresh, this null gets persisted. Next popup open shows no ENS name, and if the error continues, it never recovers.
ENS cache (ens.js): Failed lookups were cached as null with a 12-hour TTL. Even after the transient error resolved, resolveEnsName() would return the cached null without retrying the RPC call.
Fix
refreshBalances: on error, keep the existing addr.ensName value instead of overwriting with null
Added debug logging to ENS reverse lookups for easier debugging
Testing
make check passes (14 tests + prettier).
## Summary
Fixes #22: ENS reverse lookups appearing broken — addresses show bare hex even when they have a .eth reverse.
## Root Cause
Two issues that could cause ENS names to disappear:
1. **`refreshBalances` (balances.js)**: On ENS lookup error (timeout, RPC failure, etc.), `addr.ensName` was set to `null`, wiping any previously resolved name. Since `saveState()` runs after refresh, this `null` gets persisted. Next popup open shows no ENS name, and if the error continues, it never recovers.
2. **ENS cache (ens.js)**: Failed lookups were cached as `null` with a 12-hour TTL. Even after the transient error resolved, `resolveEnsName()` would return the cached `null` without retrying the RPC call.
## Fix
1. `refreshBalances`: on error, keep the existing `addr.ensName` value instead of overwriting with `null`
2. `ens.js`: don't cache failed lookups — let subsequent calls retry immediately
3. Added debug logging to ENS reverse lookups for easier debugging
## Testing
`make check` passes (14 tests + prettier).
sneak
was assigned by clawbot2026-02-27 23:24:48 +01:00
Two issues that could cause ENS names to disappear:
1. refreshBalances: on ENS lookup error, addr.ensName was set to null,
wiping any previously resolved name. Now keeps the existing value
on error — only overwrites on successful lookup.
2. ens.js cache: failed lookups were cached as null for 12 hours,
preventing retries even after transient errors resolved. Now skips
caching on failure so subsequent lookups retry immediately.
Added debug logging to ENS reverse lookups in refreshBalances.
LGTM — fixes the root cause of ENS names disappearing:
ens.js: no longer caches failures, so transient RPC errors don't block retries for 12h
balances.js: catch block preserves existing addr.ensName instead of overwriting with null
Added debug logging for ENS resolution
This should be merged before PR #25, which complements it by ensuring ENS lookups run for ALL addresses in tx lists (not just counterparties).
Formatting clean. Assigning to sneak.
## Code Review
**LGTM** — fixes the root cause of ENS names disappearing:
1. `ens.js`: no longer caches failures, so transient RPC errors don't block retries for 12h
2. `balances.js`: `catch` block preserves existing `addr.ensName` instead of overwriting with `null`
3. Added debug logging for ENS resolution
This should be merged before PR #25, which complements it by ensuring ENS lookups run for ALL addresses in tx lists (not just counterparties).
Formatting clean. Assigning to sneak.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Fixes #22: ENS reverse lookups appearing broken — addresses show bare hex even when they have a .eth reverse.
Root Cause
Two issues that could cause ENS names to disappear:
refreshBalances(balances.js): On ENS lookup error (timeout, RPC failure, etc.),addr.ensNamewas set tonull, wiping any previously resolved name. SincesaveState()runs after refresh, thisnullgets persisted. Next popup open shows no ENS name, and if the error continues, it never recovers.ENS cache (ens.js): Failed lookups were cached as
nullwith a 12-hour TTL. Even after the transient error resolved,resolveEnsName()would return the cachednullwithout retrying the RPC call.Fix
refreshBalances: on error, keep the existingaddr.ensNamevalue instead of overwriting withnullens.js: don't cache failed lookups — let subsequent calls retry immediatelyTesting
make checkpasses (14 tests + prettier).Code Review
LGTM — fixes the root cause of ENS names disappearing:
ens.js: no longer caches failures, so transient RPC errors don't block retries for 12hbalances.js:catchblock preserves existingaddr.ensNameinstead of overwriting withnullThis should be merged before PR #25, which complements it by ensuring ENS lookups run for ALL addresses in tx lists (not just counterparties).
Formatting clean. Assigning to sneak.