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

fix: prevent unnecessary wallet info requests #297

Merged
1 commit merged into from
Jun 2, 2022
Merged

Conversation

theborakompanioni
Copy link
Collaborator

@theborakompanioni theborakompanioni commented May 27, 2022

This fix prevents unnecessary wallet info requests.
Wallet data is automatically loaded on initial page renderings.
However, if a components needs an up-to-date balance, it always triggers reloadCurrentWalletInfo.

Before this commit, this meant that the data is loaded twice when the app is refreshed on a component that needs wallet infos.
After this commit, the reloadCurrentWalletInfo method knows that an api request is already performed and will wait for it to be completed.

Before:
image

After:
image

@theborakompanioni theborakompanioni added bug Something isn't working performance Performance and/or speed improvements labels May 27, 2022
@theborakompanioni theborakompanioni marked this pull request as draft May 27, 2022 10:29
@theborakompanioni theborakompanioni force-pushed the smart-balance-fetch branch 2 times, most recently from f7d4ff5 to a2d8e64 Compare May 27, 2022 11:20
@theborakompanioni theborakompanioni marked this pull request as ready for review May 27, 2022 11:26
@theborakompanioni theborakompanioni self-assigned this May 27, 2022
@ghost ghost merged commit 9377b33 into master Jun 2, 2022
@ghost ghost deleted the smart-balance-fetch branch June 2, 2022 11:28
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance Performance and/or speed improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant