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

Wallet balances refetched too much #487

Open
3 tasks
aomafarag opened this issue Oct 6, 2022 · 0 comments
Open
3 tasks

Wallet balances refetched too much #487

aomafarag opened this issue Oct 6, 2022 · 0 comments

Comments

@aomafarag
Copy link
Contributor

aomafarag commented Oct 6, 2022

Goal

Optimize wallet setup and balances fetching.

Context

Currently, we re-setup the wallet whenever the wallet modal is opened. This action resets the wallet, which involves resetting its balances and re-fetching them. As a result, the WithdrawDAIPanel, whose current state and title is displayed via a computed property that depends on the amount of DAI in VAT, collapses and expands whenever the wallet modal is opened (see Assets). Additionally, whenever the withdraw button is clicked, the animation due to AnimatedNumber is rerun (see Assets). I guess this has to do with the fact that BaseButton treats the loading and non-loading cases as two separate templates.

Assets

perf.mp4

Tasks

  • Suggest a modification to the store logic that allows wallet balances to persist when re-fetching isn't necessary.
  • Modify BaseButton so that it switches between the loading and non-loading state in a single template (if this is why the animation is rerun)
  • Implement that suggestion once approved.
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

No branches or pull requests

1 participant