From 780f4fddf71fe158ef899353b0210a53b02430c6 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 11 Sep 2023 07:13:27 -0400 Subject: [PATCH] fix: newBootloaderQuery now returns an ErrTuple --- src/kernel/auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kernel/auth.ts b/src/kernel/auth.ts index 3410e84..026a42b 100644 --- a/src/kernel/auth.ts +++ b/src/kernel/auth.ts @@ -90,12 +90,12 @@ async function login(key: Uint8Array) { data: bytesToHex(x25519.getPublicKey(privKey)), }); - if (pubKeyRet.err) { - alert(`Failed to login: could not get communication key: ${pubKeyRet.err}`); + if (pubKeyRet[1]) { + alert(`Failed to login: could not get communication key: ${pubKeyRet[1]}`); return; } - let pubKey = hexToBytes(pubKeyRet.data); + let pubKey = hexToBytes(pubKeyRet[0] as string); const secret = x25519.getSharedSecret(privKey, pubKey); const nonce = randomBytes(24);