Repository navigation
Conversation
Contributor
|
Tested locally — the fix works. Unit / CI: ran the new Android emulator (debug build of this branch): created a mainnet and a Signet wallet, switched Mainnet → Signet → Mainnet, then hot-swapped master's versions of the changed files into the same build and repeated.
Code review notes:
Not covered: iOS (change is JS-only), and a Track-a-payment match (test wallet had no incoming silent payment). LGTM 👍 |
chaitika
force-pushed
the
fix/resume-scan-after-network-switch
branch
from
November 15, 2026 06:24
6c4f08d to
5592a90
Compare
A network switch cancels the outgoing wallet's scan but keeps the wallet object, and nothing cleared the cancel flag again. After switching to Signet and back, the mainnet wallet stopped scanning for silent payments until the app restarted: pull-to-refresh and polling did nothing, and Track a payment reported "No payment found" for real silent payments. - Add allowScanning() to undo cancelScan(), and remove the reset in scanForPayments that could never run. - switchNetwork re-enables and restarts the scan for the incoming wallets once the indexer points at their chain, and for the outgoing wallets when a switch fails. - Correct the networkPreference comment that said the caller reloads wallets from storage.
chaitika
force-pushed
the
fix/resume-scan-after-network-switch
branch
from
November 15, 2026 07:00
5592a90 to
99e0ea9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After switching from Mainnet to Signet and back, the mainnet wallet stopped scanning for silent payments until the app was restarted:
The switch cancels the outgoing wallet's scan but keeps the wallet object, and nothing ever cleared the cancel flag again.
allowScanning()to undocancelScan(), and remove the reset inscanForPaymentsthat could never runswitchNetworkre-enables and restarts the scan for the incoming wallets once the indexer points at their chain, and for the outgoing wallets when a switch fails. Switching to a network for the first time in a session now also starts its wallet's scan right away, instead of waiting for pull-to-refreshnetworkPreference.tscomment that said the caller reloads wallets from storageThe failing unit test (
sendDetails) is unrelated and also fails on master; #234 fixes it.