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 WatchConnectivity.shared.sendWalletsToWatch();
DeviceQuickActions.setWallets(this.wallets);
DeviceQuickActions.setQuickActions();
const isStorageEncrypted = await this.storageIsEncrypted;
if (isStorageEncrypted) {
DeviceQuickActions.clearShortcutItems();
DeviceQuickActions.removeAllWallets();
} else {
DeviceQuickActions.setWallets(this.wallets);
DeviceQuickActions.setQuickActions();
}
return true;
} else {
return false; // failed loading data or loading/decryptin data