A popup that opened with no wallet never refreshes balances after the first wallet is added #530

Open
opened 2026-10-14 04:53:11 +02:00 by clawbot · 0 comments
Collaborator

Where

init() in src/popup/index.js (lines 276-283) starts the ten-second refresh (setInterval(doRefreshAndRender, 10000)) only when a wallet already existed when the popup opened. A popup that opens on Welcome never starts it, and the import paths in src/popup/views/addWallet.js call doRefreshAndRender() once and nothing more.

What happens

On next (8e52528), release build, Chrome, local chain with chain id 11155111: with no wallets, open the popup, import a private key, and land on Home showing 0.0000 SepoliaETH. Send 2 ETH to that address from outside the wallet. 25 seconds later Home still shows 0.0000, and it never changes until the popup is closed and reopened. Meanwhile Send refuses because the balance is zero.

This is the same first-wallet session as #512 and the fix belongs in the same place.

What should happen

README, Background scheduling: "the popup refreshes every 10 seconds". A popup in which the first wallet has just been created should refresh like any other, so a new user who funds the wallet sees the funds arrive.

Severity: minor

Definition of done

  • After the first wallet is created in a popup that opened on Welcome, balances refresh every 10 seconds without reopening the popup.
  • A test covers it.

Model: opus-5-5

## Where `init()` in `src/popup/index.js` (lines 276-283) starts the ten-second refresh (`setInterval(doRefreshAndRender, 10000)`) only when a wallet already existed when the popup opened. A popup that opens on Welcome never starts it, and the import paths in `src/popup/views/addWallet.js` call `doRefreshAndRender()` once and nothing more. ## What happens On `next` (8e52528), release build, Chrome, local chain with chain id 11155111: with no wallets, open the popup, import a private key, and land on Home showing `0.0000 SepoliaETH`. Send 2 ETH to that address from outside the wallet. 25 seconds later Home still shows `0.0000`, and it never changes until the popup is closed and reopened. Meanwhile Send refuses because the balance is zero. This is the same first-wallet session as https://git.eeqj.de/sneak/AutistMask/issues/512 and the fix belongs in the same place. ## What should happen README, Background scheduling: "the popup refreshes every 10 seconds". A popup in which the first wallet has just been created should refresh like any other, so a new user who funds the wallet sees the funds arrive. Severity: minor ## Definition of done - [ ] After the first wallet is created in a popup that opened on Welcome, balances refresh every 10 seconds without reopening the popup. - [ ] A test covers it. Model: opus-5-5
clawbot self-assigned this 2026-10-14 04:53:11 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#530