This code will execute when database initialization will fail for the second time. Should delete database and perform "soft login".
Context in ENG-2071
Details
Make this code execute and check if new database is created, user is re-logged and data in database is populated
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
native/data/sqlite-data-handler.js | ||
---|---|---|
88–102 ↗ | (On Diff #20018) | A couple of issues here:
|
104–112 ↗ | (On Diff #20018) | This is also repeated code that could be refactored into function. |
native/data/sqlite-data-handler.js | ||
---|---|---|
88–102 ↗ | (On Diff #20018) |
Right, done > Is it intentional not to surround this call to clearSensitiveData with try catch statement? No, it's my mistake, thanks for pointing
I am afraid it'll be hard, handleSensitiveData uses database in its logic, and in this scenario - database is malformed so it'll be hard to achieve something workable and readable simultaneously.
Are you sure about this? after the malformed database is detected we return from this function, or do you have in mind some sort of race condition? |
rename source
lib/types/account-types.js | ||
---|---|---|
90 ↗ | (On Diff #20688) | Agree with you, updating |
native/data/sqlite-data-handler.js | ||
123–127 ↗ | (On Diff #20688) | I wanted to make it work the same way as clearing sensitive data after logout (see lines 99-109). Do you think we should update this? Or modify only this case? |
native/data/sqlite-data-handler.js | ||
---|---|---|
134 ↗ | (On Diff #21584) | It is useful - let's keep it. |
Do you think we can get rid of these alerts now? Having to click through the alerts is kind of getting annoying on iOS Simulator.
native/data/sqlite-data-handler.js | ||
---|---|---|
187 | We're no longer using several of these directly in the dep list, so they can be removed. I'm actually not sure why the React hook ESLint rules didn't catch this |
native/data/sqlite-data-handler.js | ||
---|---|---|
193 | It's not clear why this one was added to the dep list... it doesn't appear to be used in the effect |