Closed dhriaznov closed 10 months ago
reassigned the review to @fedeerbes since he will be working on the same feature for mobile
Thanks for the suggestions @fedeerbes , I applied them ๐ could you take a second look please?
before moving to testing we need to make sure ft token with fiat rate are part of the account balance. and maybe have a single util to calculate the balance per account
cc @dhriaznov
I added the fungible token balance calculation and also moved the calculateTotalBalance
method to utils to reuse it instead of copying, @fedeerbes, could you review pls?
I updated the PR resolving the git conflicts, adding the brc-20 balance calculation to the calculateTotalBalance
util func and fixing the issue that Duลกana found (when there were different total balance values on the Dashboard and Change Account screens), could you please review again? @fedeerbes
I tested it with ledger account as well:
@dhriaznov fv needs branch updated
Test with build here: https://github.com/secretkeylabs/xverse-web-extension/actions/runs/7655437589
๐ PR Type
What kind of change does this PR introduce?
๐ Background
See --> https://www.notion.so/xverseapp/View-Accounts-balances-from-change-account-list-0b183d7d92a0446a88bc2e8bc3432f2b?pvs=4#3761a6cca9254b53bc9ef42511b61f77
Issue Link: #[ENG-3513] Context Link (if applicable):
๐ Changes
useAccountBalance
hook fetching and calculating the total of BTC + STX accounts balance in a queue of requestsuseIntersectionObserver
hook which helps to trigger the fetching on scroll when the item in the account list is visible on the user's screenImpact:
๐ผ Screenshot / ๐น Video
https://github.com/secretkeylabs/xverse-web-extension/assets/36603049/001fab65-5b5a-4637-92bc-4d4eca99c043
โ Review checklist
Please ensure the following are true before merging: