-
Notifications
You must be signed in to change notification settings - Fork 374
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] Fix persisted data loss on iOS #2249
Merged
celo-ci-bot-user
merged 4 commits into
master
from
jeanregisser/fix-persisted-data-loss-on-ios
Dec 16, 2019
Merged
[Wallet] Fix persisted data loss on iOS #2249
celo-ci-bot-user
merged 4 commits into
master
from
jeanregisser/fix-persisted-data-loss-on-ios
Dec 16, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmcewen
approved these changes
Dec 13, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch this looks like a rough one. Nice job tracking it down, and apologies for missing this in the original upgrade. Also nice job preventing future breaks
jmrossy
approved these changes
Dec 14, 2019
aaronmgdr
added a commit
that referenced
this pull request
Dec 16, 2019
* master: (40 commits) Add utils as a dep (#2252) [Wallet] Create run_app.sh script to facilitate app development (#2186) [Wallet] Fix persisted data loss on iOS (#2249) adds Testing TSX /react on the web (#2229) Update running-a-validator.md (#2259) Add ts-ignore (#2254) Revert "Revert "Upgrade TS version (#2196)" (#2251)" (#2255) Force same bignumber version (#2256) Fix missing Text on website (#2237) Revert "Upgrade TS version (#2196)" (#2251) [Wallet] Refer to Celo Lite as "Data Saver" mode (#2232) Fix using requester instead of requestee at Outgoing notifications (#2240) Use correct phone placeholder depending on the country on joining Celo view (#2061) Update Attestation Bot Docker Image (#2231) Baklava phase 1.1 .env file (#2226) [Docs] Fix typo (#2225) Upgrade Dependencies and get react hooks working (#2203) Update attestation service docker images (#2202) Updates TME docker images (#2200) Remove walletkit from celotool transactions commands (#2206) ... # Conflicts: # packages/web/package.json
aaronmgdr
added a commit
that referenced
this pull request
Dec 16, 2019
* master: Add utils as a dep (#2252) [Wallet] Create run_app.sh script to facilitate app development (#2186) [Wallet] Fix persisted data loss on iOS (#2249) adds Testing TSX /react on the web (#2229) Update running-a-validator.md (#2259) Add ts-ignore (#2254) Revert "Revert "Upgrade TS version (#2196)" (#2251)" (#2255) Force same bignumber version (#2256) Fix missing Text on website (#2237) Revert "Upgrade TS version (#2196)" (#2251) [Wallet] Refer to Celo Lite as "Data Saver" mode (#2232) Fix using requester instead of requestee at Outgoing notifications (#2240) Use correct phone placeholder depending on the country on joining Celo view (#2061) Update Attestation Bot Docker Image (#2231) Baklava phase 1.1 .env file (#2226) [Docs] Fix typo (#2225) Upgrade Dependencies and get react hooks working (#2203) Update attestation service docker images (#2202) Updates TME docker images (#2200) Remove walletkit from celotool transactions commands (#2206)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes AsyncStorage data loss on iOS.
We had modules importing
AsyncStorage
from React Native Core and some others from React Native Community. The 2 implementations were essentially competing and causing the problem.Since both implementations currently write to the same file on disk, the last one to write wins and erases the existing data written by the other.
See react-native-async-storage/async-storage#118 (comment)
Though I updated the offending import in Apollo, the fix here also makes sure this problem won't sneak back in if we add a dependency which still imports
AsyncStorage
from React Native Core. This is done by monkey patching React Native so it also returns the community implementation of AsyncStorage.Pretty scary bug, I'm glad we didn't ship that 😅
Tested
Followed the steps to reproduced the issue as described in #2248, and observed the problem doesn't happen anymore.
Other changes
N/A
Related issues
Backwards compatibility
Yes