-
Notifications
You must be signed in to change notification settings - Fork 56
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] Indicate wallet is syncing after completing installer #1370
[GUI] Indicate wallet is syncing after completing installer #1370
Conversation
The `amount` function can call `amount_with_size` rather than repeating the underlying call to `render_amount`.
Here's how it looks when importing a descriptor: |
The wallet's height is taken from the cache and is used to check if the wallet has been initially synced after creation. For the remote backend, the cache refresh should be done with the usual frequency while the wallet's height is 0 so that the sync completion can be detected sooner.
24d2075
to
6f4eb79
Compare
I've made the following changes:
|
Note: while importing descriptor with a bitcoin core, the synced state is still empty which is normal because user has to trigger a rescan but it may be confusing as the "syncing" implies that the wallet is updating to a correct state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 6f4eb79
That's a good point, and bad UX from our import descriptor flow. I suppose the user should ask for the rescan at import time, before going to the wallet. |
As per what was discussed offline:
This should be a valid option since in the cases in which wallet height is 0 we don't expect any update from the first poll. |
9208cd1 gui: don't treat wallets using bitcoind as syncing (Michael Mallan) f34bb1b gui: include node type in embedded daemon backend (Michael Mallan) Pull request description: This is a follow-up to #1370. If the user has imported a descriptor and is using bitcoind as a local node, then they will need to perform a rescan in order to see past transactions. Treating the wallet as syncing in this case could mislead the user that a rescan is being performed. Therefore, it's better to keep the past behaviour here to avoid further confusion. ACKs for top commit: edouardparis: ACK 9208cd1 Tree-SHA512: fabb3289f01c68309cd511854b0ea249e5fa1279c736bfc61c3140ca3352dfc24a1be46c977ed21c528a67c3d1f0e16521d94aaa0ee1c17d8f9ed4f3403547d0
…pletes after opening ec7556e gui(home): indicate existing wallet is syncing (Michael Mallan) f7314aa gui(cache): include last poll timestamp (Michael Mallan) 9dd737b gui: upgrade liana dependency (Michael Mallan) Pull request description: This PR uses the changes from #1376 to complete #1373. It builds on the changes from #1370 to consider an existing wallet (that uses a local backend) to be syncing until the first poll completes after opening the GUI, where "existing wallet" means one that has positive height (since a newly created wallet has height 0). Note that for an external Liana daemon, this logic is only applied in case the last poll timestamp has already been set when starting the GUI. Otherwise, we can't be sure if this external daemon will ever set this value. ACKs for top commit: edouardparis: ACK ec7556e Tree-SHA512: a6db8e510a7d24ca554965512e289eb271dab41871bde9362a7af71b73c771431025b1be1092bab98b106fb520d8c6959d712909d1db9a21731f3a79c9f766a1
This is to resolve #1361.
The home page considers the wallet to be syncing if its height is 0. In this case, the balance will slowly blink and a "Syncing..." text will appear just below.
The home page will check the wallet's height upon each cache refresh, and will reload the home page once the syncing has completed so that the updated balance is displayed without the user needing to do anything.
Both the blinking balance and "Syncing..." text use a new
Carousel
widget that cycles through different child widgets at a specified rate.EDIT: I've added an extra commit to address #1363 as that is also related to the wallet height and cache refresh.