Wallet panel can be slow to load balance. We should utilize balance cache added in https://github.com/brave/brave-browser/issues/35986 to load the balance for the selected Dapp account(s) & networks to display the native token balance quickly to avoid long delays when panel is opened (currently more noticeable on panel with wallets utilizing many networks and/or accounts with balance).
Steps to Reproduce
Restore wallet that has balance in Eth testnet
Connect wallet to a Dapp
Open panel, shows balance as 0
Open wallet and select the token from testnet, shows actual balance
Seems like balance fetch is slow here (last frame of video shows balance on the panel). We'll look to see if we can improve this before balance caching lands.
Description:
Wallet panel can be slow to load balance. We should utilize balance cache added in https://github.com/brave/brave-browser/issues/35986 to load the balance for the selected Dapp account(s) & networks to display the native token balance quickly to avoid long delays when panel is opened (currently more noticeable on panel with wallets utilizing many networks and/or accounts with balance).
Steps to Reproduce
Actual result:
https://github.com/brave/brave-ios/assets/17010094/1cdabdfc-cae4-41bb-93bf-f128dc6980b4
Expected result:
Show balance on panel
Reproduces how often: [Easily reproduced, Intermittent Issue]
Easy
Brave Version:
Device details:
iPhone 13 (iOS 17.4)
Website problems only:
Additional Information
cc: @nuo-xu @StephenHeaps