From 0e3eeab828742f5b76233d8e03c803eaf0deb651 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 3 Jun 2019 15:44:05 -0400 Subject: [PATCH] post migration --- src/App/Migration/MigrationHelpers.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/App/Migration/MigrationHelpers.cs b/src/App/Migration/MigrationHelpers.cs index e344a1c10..6f8ceb369 100644 --- a/src/App/Migration/MigrationHelpers.cs +++ b/src/App/Migration/MigrationHelpers.cs @@ -173,15 +173,18 @@ namespace Bit.App.Migration var pinProtectedKey = await cryptoService.EncryptAsync(oldKeyBytes, pinKey); await storageService.SaveAsync(Constants.PinProtectedKey, pinProtectedKey.EncryptedString); } - + + // Post migration tasks await cryptoService.ToggleKeyAsync(); + await storageService.SaveAsync(Constants.LastActiveKey, DateTime.MinValue); + await lockService.CheckLockAsync(); // Remove "needs migration" flag settingsShim.Remove(Constants.OldUserIdKey); Migrating = false; messagingService.Send("migrated"); - await lockService.CheckLockAsync(); var task = Task.Run(() => syncService.FullSyncAsync(true)); + return true; } }