From c63723ffb3b9b9bbacd791afbc7d4b457ef74499 Mon Sep 17 00:00:00 2001 From: agoltzman <106151463+agoltzman@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:09:50 +0200 Subject: [PATCH] fix: allow deployment reset when using relay --- apps/recovery-utility/main/background.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/recovery-utility/main/background.ts b/apps/recovery-utility/main/background.ts index 638706f9..13b3e00b 100644 --- a/apps/recovery-utility/main/background.ts +++ b/apps/recovery-utility/main/background.ts @@ -27,7 +27,11 @@ let relayUrl: string | undefined; const DEFAULT_PROTOCOL = 'UTILITY'; const deployment = DeploymentStore.get(); -let protocol = deployment?.protocol || DEFAULT_PROTOCOL; +let protocol = deployment.exp + ? deployment.exp > Date.now() + ? deployment?.protocol || DEFAULT_PROTOCOL + : DEFAULT_PROTOCOL + : DEFAULT_PROTOCOL; const relay = app.commandLine.hasSwitch('relay'); const util = app.commandLine.hasSwitch('util'); console.log(`Command line specified: relay: ${relay}, util: ${util}.`);