secretkeylabs / xverse-web-extension

Other
46 stars 25 forks source link

[ENG-3513] feat: View accounts balances in the Change Account screen #756

Closed dhriaznov closed 10 months ago

dhriaznov commented 10 months ago

๐Ÿ”˜ 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

Impact:

๐Ÿ–ผ Screenshot / ๐Ÿ“น Video

account balance Monosnap Monosnap 2024-01-16 21-11-01

https://github.com/secretkeylabs/xverse-web-extension/assets/36603049/001fab65-5b5a-4637-92bc-4d4eca99c043

โœ… Review checklist

Please ensure the following are true before merging:

teebszet commented 10 months ago

reassigned the review to @fedeerbes since he will be working on the same feature for mobile

dhriaznov commented 10 months ago

Thanks for the suggestions @fedeerbes , I applied them ๐Ÿ™Œ could you take a second look please?

fedeerbes commented 10 months ago

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

dhriaznov commented 10 months ago

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?

dhriaznov commented 10 months ago

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

Monosnap Monosnap 2024-01-24 20-03-14 Monosnap Monosnap 2024-01-24 20-03-19

dhriaznov commented 10 months ago

I tested it with ledger account as well:

ledger Monosnap Monosnap 2024-01-24 20-10-32 ledger 2Monosnap Monosnap 2024-01-24 20-10-42

DuskaT021 commented 10 months ago

@dhriaznov fv needs branch updated

github-actions[bot] commented 10 months ago

Test with build here: https://github.com/secretkeylabs/xverse-web-extension/actions/runs/7655437589