From b1fa47d1e6573c27076d44631eefd6e059f2160a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 4 Aug 2023 11:27:44 -0400 Subject: [PATCH] refactor: run exchangeCommunicationKeys inside setLoginKey --- shared/keys.ts | 1 + ui/apps/account/App.tsx | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/keys.ts b/shared/keys.ts index fa8d22b..2cea3ac 100644 --- a/shared/keys.ts +++ b/shared/keys.ts @@ -31,6 +31,7 @@ export async function exchangeCommunicationKeys() { } export async function setLoginKey(key: Uint8Array) { + await exchangeCommunicationKeys(); const privKey = getCommunicationKey(); const pubKey = getRemoteCommunicationKey(); diff --git a/ui/apps/account/App.tsx b/ui/apps/account/App.tsx index b507bbc..cb40188 100644 --- a/ui/apps/account/App.tsx +++ b/ui/apps/account/App.tsx @@ -127,7 +127,6 @@ export default function App() { const seed = await bip39.mnemonicToSeed(wordSeed); const key = HDKey.fromMasterSeed(seed).derive(BIP44_PATH); - await exchangeCommunicationKeys(); await setLoginKey(key.privateKey); window.setTimeout(() => {