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

fix(wallet): Update balance loading state on token fetched #14491

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

Cuteivist
Copy link
Contributor

@Cuteivist Cuteivist commented Apr 19, 2024

Closes #14427
Closes #14514

What does the PR do

  • Update wałlet accounts model when balances are loaded
  • Check all accounts for asset loading. It will properly show loading state in "All accounts" whenever any account is in loading state

Affected areas

Wallet

Screenshot of functionality (including design for comparison)

2024-04-19_16-29-51.mp4

@anastasiyaig anastasiyaig linked an issue Apr 19, 2024 that may be closed by this pull request
@status-im-auto
Copy link
Member

status-im-auto commented Apr 19, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
0486448 #1 2024-04-19 14:41:47 ~4 min macos/aarch64 📄log
✔️ 0486448 #1 2024-04-19 14:43:28 ~6 min tests/nim 📄log
✔️ b235bf4 #2 2024-04-19 14:49:35 ~5 min macos/aarch64 🍎dmg
✔️ b235bf4 #2 2024-04-19 14:51:04 ~6 min tests/nim 📄log
✔️ b235bf4 #2 2024-04-19 14:54:33 ~10 min macos/x86_64 🍎dmg
✔️ b235bf4 #2 2024-04-19 14:55:45 ~11 min tests/ui 📄log
✔️ b235bf4 #2 2024-04-19 15:00:48 ~16 min linux/x86_64 📦tgz
✔️ b235bf4 #2 2024-04-19 15:08:26 ~24 min windows/x86_64 💿exe

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

With a small suggestion :)

let loading = walletAccounts[0].assetsLoading or self.controller.getTokensMarketValuesLoading()
if walletAccounts.len == 0:
return
var loading = self.controller.getTokensMarketValuesLoading()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var loading = self.controller.getTokensMarketValuesLoading()
var loading = self.controller.getTokensMarketValuesLoading() or anyIt(walletAccounts, it.assetsLoading)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(instead of the for loop below)

@Cuteivist Cuteivist merged commit 72a081c into master Apr 25, 2024
8 checks passed
@Cuteivist Cuteivist deleted the bugfix/wallet-balance-14427 branch April 25, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Balances are not fetched when being on all accounts tab Wallet balances are loading too slow
4 participants