Skip to content

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

@annybs

Description

@annybs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions