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
[DDW-492] Add initial loading state to UTXO screen #2265
Conversation
Hi @DominikGuzei Here is the finding for build 15520. New issue Non issue on this PR |
@mioriohk thanks for the video - you were right, the logic was missing one check 👏 |
Hi @DominikGuzei. Here is the report for build 15543.
|
@@ -39,6 +39,9 @@ export default class WalletSettingsPage extends Component<Props> { | |||
|
|||
return ( | |||
<WalletUtxo | |||
isLoadingInitialUtxoData={ | |||
walletSettings.getWalletUtxosRequest.isExecutingFirstTime |
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.
@DominikGuzei shouldn't we make sure we check if this request has been executed for the first time for the active wallet? We fetch UTXO distribution data for each wallet and I am afraid we will have this working only for the first one (or if the user has only one wallet)...
If I remember correctly, it should be possible to pass on walletId to check if the request has been ever executed for the given wallet?
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.
Great catch 👍
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.
@nikolaglumac my latest commit fixes this by resetting the utxo request when leaving the utxo page. This also means that it will show the spinner also anytime you go back to the utxo page within the same wallet. But it's the easiest solution and I think ok since the spinner is rarely showing up anyway - what do you think?
@mioriohk ready for testing again 👍 |
@mioriohk sorry, I could reproduce the issue from your video and also fixed these edge cases (these have been caused because the loading spinner was only shown when the utxo request has already been made - now it's also shown before the request has been made). Ready for final test 🎉 |
Hi @DominikGuzei. Here is the report for build 15559.
|
@mioriohk would you mind approving this PR if it is all good from your side? 🙏 |
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.
Looks good to me, Well done @DominikGuzei 👍
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.
Great work @DominikGuzei 👌
This PR adds an initial loading state for the UTXO page:
Screenshots
Testing Checklist
Test cases
Scenario 1: Wallet with UTXO, select first time
Given I am on Daedalus
And Daedalus is fully synced
And I have a fully synced wallet with UTXO
When I select the wallet for the first time
And navigate to ‘Wallet UTXO distribution’
Then I will briefly see the text ‘Wallet UTXO distribution’
And I will briefly see the spinner
And the spinner disappears
And I see the text “The wallet contains xxx ADA on x UTXOs ….”
And I see the UTXO graph distribution
Scenario 2: Wallet with no UTXO
Given I am on Daedalus
And Daedalus is fully synced
And I have a fully synced wallet with 0 ADA
When I select the wallet
And navigate to ‘Wallet UTXO distribution’
Then I will see the text ‘Wallet UTXO distribution’
And I will briefly see the spinner
And the spinner disappears
And underneath I will see the text “This wallet is empty….”
Scenario 3: Wallet with UTXO, select the second time
Given I am on Daedalus
And Daedalus is fully synced
And I have a fully synced wallet with UTXO
And I have already checked this wallet for UTXO distribution
When I select the wallet for the second time
And navigate to ‘Wallet UTXO distribution’
Then I will see the text ‘Wallet UTXO distribution’
And I will briefly see the spinner
And the spinner disappears
And I see the text “The wallet contains xxx ADA on x UTXOs ….”
And I see the UTXO graph distribution
Scenario 4: Select another wallet with UTXO, after checking UTXO of the first wallet
Given I am on Daedalus
And Daedalus is fully synced
And I have 2 fully synced wallets with UTXO
And both wallets have never been selected to check UTXO distribution
And I have checked the UTXO distribution of the first wallet
When I select the second wallet
And navigate to ‘Wallet UTXO distribution’
Then I will briefly see the text ‘Wallet UTXO distribution’
And I will briefly see the spinner
And the spinner disappears
And I see the text “The wallet contains xxx ADA on x UTXOs ….”
And I see the UTXO graph distribution
Testing Summary
For build 15559
Review Checklist
Basics
feature
/bug
/chore
,release-x.x.x
)yarn test
)yarn dev
)yarn package
/ CI builds)yarn flow:test
)yarn lint
)yarn prettier:check
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review
done
column on the YouTrack board