FIX: Remove quick actions if storage is encrypted

This commit is contained in:
marcosrdz 2020-04-07 13:21:37 -04:00 committed by Overtorment
parent 424dc29afc
commit f4b2ffaa0e

View File

@ -302,8 +302,15 @@ export class AppStorage {
await this.saveToDisk(); await this.saveToDisk();
}; };
await WatchConnectivity.shared.sendWalletsToWatch(); await WatchConnectivity.shared.sendWalletsToWatch();
const isStorageEncrypted = await this.storageIsEncrypted;
if (isStorageEncrypted) {
DeviceQuickActions.clearShortcutItems();
DeviceQuickActions.removeAllWallets();
} else {
DeviceQuickActions.setWallets(this.wallets); DeviceQuickActions.setWallets(this.wallets);
DeviceQuickActions.setQuickActions(); DeviceQuickActions.setQuickActions();
}
return true; return true;
} else { } else {
return false; // failed loading data or loading/decryptin data return false; // failed loading data or loading/decryptin data