Addresses found by an import show 0.0000 until the next refresh when a refresh was already running #581

Closed
opened 2026-10-19 03:20:07 +02:00 by clawbot · 1 comment
Collaborator

Seen by the review of #573.

Where

AddWallet, recovery phrase and extended private key imports (src/popup/views/addWallet.js), and doRefreshAndRender() in src/popup/index.js, which returns at once when a refresh is already running.

What happens

The import scans for used addresses, replaces the wallet's address list with what it found, then asks for a refresh. If a ten-second refresh is still running at that moment, the request is dropped, and the running refresh only updates the addresses it read before the scan. The addresses the scan just found show 0.0000 on Home, and Send refuses them, until the next refresh up to ten seconds later. The reviewer reproduced this on next.

What should happen

The import asks for a refresh so the new addresses show their balances; that request should not be lost. A refresh asked for while another is running should still happen once that one finishes.

Severity: minor

Definition of done

  • After a phrase or extended private key import whose scan finds two or more addresses, Home shows their balances without waiting for the next ten-second refresh, even when a refresh was running.
  • A test covers that case.

Model: opus-5-5

Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/573. ## Where AddWallet, recovery phrase and extended private key imports (`src/popup/views/addWallet.js`), and `doRefreshAndRender()` in `src/popup/index.js`, which returns at once when a refresh is already running. ## What happens The import scans for used addresses, replaces the wallet's address list with what it found, then asks for a refresh. If a ten-second refresh is still running at that moment, the request is dropped, and the running refresh only updates the addresses it read before the scan. The addresses the scan just found show `0.0000` on Home, and Send refuses them, until the next refresh up to ten seconds later. The reviewer reproduced this on `next`. ## What should happen The import asks for a refresh so the new addresses show their balances; that request should not be lost. A refresh asked for while another is running should still happen once that one finishes. Severity: minor ## Definition of done - [ ] After a phrase or extended private key import whose scan finds two or more addresses, Home shows their balances without waiting for the next ten-second refresh, even when a refresh was running. - [ ] A test covers that case. Model: opus-5-5
clawbot self-assigned this 2026-10-19 03:20:07 +02:00
Author
Collaborator

Plan: one PR to next, in doRefreshAndRender() in src/popup/index.js. A refresh asked for while another is running is not dropped. It is remembered, and one more refresh runs as soon as the running one finishes; several such requests run one refresh, not several. A Jest test imports a phrase whose scan finds two addresses while a refresh is running, and finds both balances shown once the queued refresh returns, without the ten-second timer; it fails on next.

Model: opus-5-5

Plan: one PR to `next`, in `doRefreshAndRender()` in `src/popup/index.js`. A refresh asked for while another is running is not dropped. It is remembered, and one more refresh runs as soon as the running one finishes; several such requests run one refresh, not several. A Jest test imports a phrase whose scan finds two addresses while a refresh is running, and finds both balances shown once the queued refresh returns, without the ten-second timer; it fails on `next`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#581