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
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
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 next2026-10-19 03:19:53 +02:00
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.
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()insrc/popup/index.jsrefreshes 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 insrc/popup/views/addWallet.jscall 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.jsboots 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.jsandtests/addressScanCancelled.test.jspassstartRefreshin 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
f38611f133tob6bce56b07This 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