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 refresh persistence bug #5112

Merged
merged 11 commits into from
Oct 13, 2023
Merged

Fix refresh persistence bug #5112

merged 11 commits into from
Oct 13, 2023

Conversation

jinchung
Copy link
Member

@jinchung jinchung commented Oct 12, 2023

Fixes APP-840

@jinchung jinchung changed the title @jin/refresh persistence bug Fix refresh persistence bug Oct 12, 2023
@walmat
Copy link
Contributor

walmat commented Oct 12, 2023

LGTM! Nice work. Pull to refresh working. Not necessarily related to the changes made through this PR, but should the refetchInterval be lowered? 5 minutes seems like a long time to keep price data unless manually refreshed.

@linear
Copy link

linear bot commented Oct 12, 2023

APP-840 Balance updates don't consistently persist app sessions

https://rainbowhaus.slack.com/archives/C02C2FVC6N6/p1696214226512439

Broadly, issue was keeping async storage as well as react-query's path to async storage, which is separate.

We would update the data in dataLoadState in the redux/data file from the old async storage instead of reading from the new async storage.

You'll noticed I also removed some other part of the code that was updating asset information (and also updating the old redux state) which we had put in place before our backend data was as robust as it is now.

On simulator, I have confirmed refreshing data, killing the app and coming back, on both empty and non-empty wallets.

@jinchung jinchung force-pushed the @jin/refresh-persistence-bug branch from bda1317 to fe5e96f Compare October 13, 2023 00:31
@jinchung
Copy link
Member Author

LGTM! Nice work. Pull to refresh working. Not necessarily related to the changes made through this PR, but should the refetchInterval be lowered? 5 minutes seems like a long time to keep price data unless manually refreshed.

Thanks! I'll take a revisit to this separately - will depend on caching timeouts on the backend and also would like to be thoughtful bc this is the "assets balances" endpoint and we still have the separate websockets endpoint for generic asset prices, which I would need to check if we're subscribing to anyway for the wallet's assets as well

@skylarbarrera
Copy link
Contributor

agree 5 min seems way too long

@jinchung jinchung requested a review from walmat October 13, 2023 14:57
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on both OS's 👍🏽

@jinchung jinchung merged commit 488acd7 into develop Oct 13, 2023
5 checks passed
@jinchung jinchung deleted the @jin/refresh-persistence-bug branch October 13, 2023 18:25
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

Successfully merging this pull request may close these issues.

5 participants