Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GUI] Skip loading screen for existing wallets #1386

Merged

Conversation

jp1ac4
Copy link
Collaborator

@jp1ac4 jp1ac4 commented Oct 17, 2024

This is to resolve #1384 by skipping the loading screen for an existing wallet even if the blockchain is still syncing.

This change will only make a difference for local backends given that the blockchain for a Liana Connect wallet is always considered to be synced and so the loading screen was already loading the application directly Liana Connect doesn't use the loading screen.

It builds on #1377, to additionally check the blockchain sync progress, and show a message with the sync progress as a percentage in case the blockchain is not fully synced. using the logic added there to indicate on the home page that syncing is in progress if the poller has not yet run. Polling does not start until the blockchain has fully synced and so the same logic can be applied here.

For now, no distinction is made on the home page between the wallet syncing and the blockchain syncing, but this may change in future.

@jp1ac4 jp1ac4 self-assigned this Oct 17, 2024
@jp1ac4 jp1ac4 force-pushed the gui-skip-loader-for-existing-wallets branch 4 times, most recently from 37a44ab to 55680f8 Compare October 18, 2024 10:32
@jp1ac4
Copy link
Collaborator Author

jp1ac4 commented Oct 18, 2024

Rebased on #1377.

@jp1ac4 jp1ac4 force-pushed the gui-skip-loader-for-existing-wallets branch from 55680f8 to 91bf35f Compare October 18, 2024 13:34
@jp1ac4
Copy link
Collaborator Author

jp1ac4 commented Oct 18, 2024

Rebased on #1377.

@jp1ac4 jp1ac4 force-pushed the gui-skip-loader-for-existing-wallets branch from 91bf35f to 7ed09dc Compare October 18, 2024 15:03
@jp1ac4
Copy link
Collaborator Author

jp1ac4 commented Oct 18, 2024

Rebased on #1377.

@jp1ac4 jp1ac4 force-pushed the gui-skip-loader-for-existing-wallets branch 5 times, most recently from b756138 to 489c7e6 Compare October 25, 2024 16:10
@jp1ac4 jp1ac4 marked this pull request as ready for review October 26, 2024 13:16
@jp1ac4 jp1ac4 marked this pull request as draft October 28, 2024 09:40
Use an enum to clearly enumerate the different cases we are
considering and avoid the need to repeat logic relating to
blockheight in the view.
@jp1ac4 jp1ac4 force-pushed the gui-skip-loader-for-existing-wallets branch from 489c7e6 to 0a674d5 Compare October 28, 2024 12:59
@jp1ac4 jp1ac4 marked this pull request as ready for review October 28, 2024 13:15
@edouardparis
Copy link
Member

Works like a charm. I think have better UX/UI to imagine, but I am happy with the result.
One think I did not check, what if a wallet was synced (blockheight > 0), then user deleted his whole bitcoind datadir and restarted it ?
does it skip the launcher and user has a home with 2% syncing blockchain instead of a usual 99.8% synced ?

@jp1ac4
Copy link
Collaborator Author

jp1ac4 commented Oct 28, 2024

does it skip the launcher and user has a home with 2% syncing blockchain instead of a usual 99.8% synced ?

That's right, it would load the home page directly and show the sync progress as returned by getinfo, so starting from 0%.

@edouardparis
Copy link
Member

Ok thank you for the answer, it is not really inconvenient.

@edouardparis
Copy link
Member

ACK 0a674d5

@edouardparis edouardparis merged commit 131be90 into wizardsardine:master Oct 28, 2024
31 checks passed
@jp1ac4 jp1ac4 deleted the gui-skip-loader-for-existing-wallets branch October 29, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Don't block the opening of an existing wallet that uses a local backend even when blockchain syncing ongoing
2 participants