fix: a popup that opened on Welcome keeps refreshing once the first wallet is added (closes #530) #573

Merged
clawbot merged 1 commits from issue-530-refresh-after-first-wallet into next 2026-10-19 03:19:53 +02:00
Collaborator

Fixes #530.

The ten-second refresh was started only in init(), and only when a wallet existed as the popup opened. A popup that opened on Welcome refreshed the new wallet once when it was added and never again, so funds sent to it did not show until the popup was reopened.

startRefresh() in src/popup/index.js refreshes at once and starts the ten-second refresh if it is not already running. init() calls it when the popup opens with a wallet, and the three import paths in src/popup/views/addWallet.js call it where they used to refresh once. Adding a wallet while the refresh runs starts no second one. While the recovery screen is up it does nothing at all: before, an import whose address scan ended after that screen went up still ran one refresh there.

tests/firstWalletRefresh.test.js boots the popup with no wallet, adds the first from each tab, changes the balance the stand-in for the chain reports, runs the popup's intervals and checks Home shows it. It also checks for one refresh per interval after a second wallet, with and without a wallet at open, and for none when the stored record becomes unreadable during the scan. tests/addressKey.test.js and tests/addressScanCancelled.test.js pass startRefresh in the context they build for AddWallet.

Judgement call: the phrase and xprv imports start the refresh after their address scan, where their one refresh ran before, so the new wallet is not refreshed while the scan runs.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/AutistMask/issues/530. The ten-second refresh was started only in `init()`, and only when a wallet existed as the popup opened. A popup that opened on Welcome refreshed the new wallet once when it was added and never again, so funds sent to it did not show until the popup was reopened. `startRefresh()` in `src/popup/index.js` refreshes at once and starts the ten-second refresh if it is not already running. `init()` calls it when the popup opens with a wallet, and the three import paths in `src/popup/views/addWallet.js` call it where they used to refresh once. Adding a wallet while the refresh runs starts no second one. While the recovery screen is up it does nothing at all: before, an import whose address scan ended after that screen went up still ran one refresh there. `tests/firstWalletRefresh.test.js` boots the popup with no wallet, adds the first from each tab, changes the balance the stand-in for the chain reports, runs the popup's intervals and checks Home shows it. It also checks for one refresh per interval after a second wallet, with and without a wallet at open, and for none when the stored record becomes unreadable during the scan. `tests/addressKey.test.js` and `tests/addressScanCancelled.test.js` pass `startRefresh` in the context they build for AddWallet. Judgement call: the phrase and xprv imports start the refresh after their address scan, where their one refresh ran before, so the new wallet is not refreshed while the scan runs. Model: opus-5-5
clawbot added the needs-review label 2026-10-19 01:36:47 +02:00
clawbot self-assigned this 2026-10-19 01:36:47 +02:00
clawbot added 1 commit 2026-10-19 01:42:42 +02:00
fix: a popup that opened on Welcome keeps refreshing once the first wallet is added (closes #530)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
b6bce56b07
The ten-second refresh was started only by init(), and only when a wallet
existed as the popup opened, so a popup that opened on Welcome refreshed the
new wallet once and then showed that balance until it was reopened. init()
and the three import paths on AddWallet now call startRefresh(), which
refreshes at once and starts the ten-second refresh unless it is already
running, and does nothing while the recovery screen is up. The two AddWallet
tests that build their own context pass it in place of the refresh they
passed before.

Model: opus-5-5
clawbot force-pushed issue-530-refresh-after-first-wallet from f38611f133 to b6bce56b07 2026-10-19 01:42:42 +02:00 Compare
Author
Collaborator

This change meets the definition of done of #530 and can be merged into next.

Judgement call: I accept that the phrase and xprv imports start the refresh only after their address scan. The new address shows zero only while the scan runs, as it did before this change.

Model: opus-5-5

This change meets the definition of done of https://git.eeqj.de/sneak/AutistMask/issues/530 and can be merged into `next`. Judgement call: I accept that the phrase and xprv imports start the refresh only after their address scan. The new address shows zero only while the scan runs, as it did before this change. Model: opus-5-5
clawbot merged commit d2fd0f532a into next 2026-10-19 03:19:53 +02:00
clawbot deleted branch issue-530-refresh-after-first-wallet 2026-10-19 03:19:54 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#573