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

Sync gas & exchange rates to store instead of component #142

Open
annybs opened this issue Jan 19, 2022 · 0 comments
Open

Sync gas & exchange rates to store instead of component #142

annybs opened this issue Jan 19, 2022 · 0 comments

Comments

@annybs
Copy link
Member

annybs commented Jan 19, 2022

Wallet sync has been migrated away from components to the common store, improving UI synchronisation. However, other synchronisations are still in-component at the moment: namely, gas rates and exchange rates, as used primarily in the Withdraw and Sell modals.

When these components are unmounted (for example when switching between Overview/Transactions views) their state is lost, and they need to resynchronise rates upon being reopened.

Additionally, there is slight flickering of placeholders when the modals are initially displayed, while awaiting data. Although this is still an improvement on earlier implementation (where an invisible delay was imposed before displaying) it would be ideal if the rates were already there before even opening the modal.

There is also code duplication as a byproduct of requiring the same sync in multiple places.

As such, I believe it would be useful to migrate these API calls into the store and have them perpetually update in the background on a standard, single interval. This might also provide scope for other improvements, such as displaying ETH/USDC exchange rates (and accordingly, the wallet's converted value) in the design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant