|
|
@ -148,13 +148,13 @@ export class AppStorage { |
|
|
|
if (!decrypted) { |
|
|
|
throw new Error('Wrong password for main storage.'); |
|
|
|
} |
|
|
|
const decryptedParsed = JSON.parse(decrypted) |
|
|
|
const decryptedParsed = JSON.parse(decrypted); |
|
|
|
if (decrypted.wallets !== null) { |
|
|
|
this.wallets = decryptedParsed.wallets; |
|
|
|
this.tx_metadata = decryptedParsed.tx_metadata; |
|
|
|
this.cachedPassword = undefined; |
|
|
|
await RNSecureKeyStore.set(AppStorage.FLAG_ENCRYPTED, '', { accessible: ACCESSIBLE.WHEN_UNLOCKED }); |
|
|
|
await RNSecureKeyStore.set('deleteWalletAfterUninstall', true, { accessible: ACCESSIBLE.WHEN_UNLOCKED }); |
|
|
|
await RNSecureKeyStore.set('deleteWalletAfterUninstall', '1', { accessible: ACCESSIBLE.WHEN_UNLOCKED }); |
|
|
|
return this.saveToDisk(); |
|
|
|
} |
|
|
|
} |
|
|
|