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

Don't fetch prices for assets with a 0 balance #20280

Closed
Douglashdaniel opened this issue Jan 1, 2022 · 1 comment · Fixed by brave/brave-core#11731
Closed

Don't fetch prices for assets with a 0 balance #20280

Douglashdaniel opened this issue Jan 1, 2022 · 1 comment · Fixed by brave/brave-core#11731
Assignees
Labels
feature/web3/wallet Integrating Ethereum+ wallet support front-end-change This task is a front end task and doesn't need any C++ changes OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes release-notes/include

Comments

@Douglashdaniel
Copy link

Description

To better optimization and to prevent unnecessary api calls, we should not fetch prices for a users visibleAssets that have 0 balance.

@Douglashdaniel Douglashdaniel added priority/P2 A bad problem. We might uplift this to the next planned release. QA/Yes release-notes/include feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop front-end-change This task is a front end task and doesn't need any C++ changes labels Jan 1, 2022
@Douglashdaniel Douglashdaniel self-assigned this Jan 1, 2022
@Douglashdaniel Douglashdaniel added this to the 1.36.x - Nightly milestone Jan 4, 2022
@srirambv
Copy link
Contributor

srirambv commented Feb 1, 2022

Brave 1.35.98 Chromium: 98.0.4758.72 (Official Build) (64-bit)
Revision d0fe1ec4df090cd3eb02b591228505e12ea476e9-refs/branch-heads/4758@{#935}
OS ☑️ Linux ☑️ Windows 11 Version Dev
(Build 22523.1000)
☑️ macOS Version 12.0.1
(Build 21C52)
  • Verified steps from
  • Verified there is no fetch price call done to ratios server when the wallet balance is 0 on a new wallet
  • Verified selecting ETH performs a fetch price call even when ETH balance is 0
  • Verified selecting BAT performs a fetch price call even when BAT balance is 0
  • Verified locking and unlocking the wallet on a zero balance wallet doesn't do any more fetch calls
  • Verified quit and relaunch browser doesn't do a fetch call on a zero balance wallet
  • Verified if there is wallet balance then appropriate call is done on the above scenarios to get the price balance
Clean Wallet Launch
ETH Fetch Price
BAT Fetch Price
Lock Wallet/Restart browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/web3/wallet Integrating Ethereum+ wallet support front-end-change This task is a front end task and doesn't need any C++ changes OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants