From 225278adb774b56327f7257c5bbdaf3e45a77acf Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 25 May 2024 16:06:24 +0530 Subject: [PATCH] tsc --- web/packages/accounts/pages/credentials.tsx | 5 +++-- web/packages/shared/components/VerifyMasterPasswordForm.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/packages/accounts/pages/credentials.tsx b/web/packages/accounts/pages/credentials.tsx index fee34311f..4ac608109 100644 --- a/web/packages/accounts/pages/credentials.tsx +++ b/web/packages/accounts/pages/credentials.tsx @@ -150,7 +150,7 @@ export default function Credentials({ appContext, appName }: PageProps) { id, twoFactorSessionID, passkeySessionID, - } = await loginViaSRP(srpAttributes, kek); + } = await loginViaSRP(ensure(srpAttributes), kek); setIsFirstLogin(true); if (passkeySessionID) { const sessionKeyAttributes = @@ -195,7 +195,8 @@ export default function Credentials({ appContext, appName }: PageProps) { id, isTwoFactorEnabled: false, }); - setData(LS_KEYS.KEY_ATTRIBUTES, ensure(keyAttributes)); + if (keyAttributes) + setData(LS_KEYS.KEY_ATTRIBUTES, keyAttributes); return keyAttributes; } } catch (e) { diff --git a/web/packages/shared/components/VerifyMasterPasswordForm.tsx b/web/packages/shared/components/VerifyMasterPasswordForm.tsx index c84761d3f..eab20f5be 100644 --- a/web/packages/shared/components/VerifyMasterPasswordForm.tsx +++ b/web/packages/shared/components/VerifyMasterPasswordForm.tsx @@ -20,7 +20,7 @@ export interface VerifyMasterPasswordFormProps { ) => void; buttonText: string; submitButtonProps?: ButtonProps; - getKeyAttributes?: (kek: string) => Promise; + getKeyAttributes?: (kek: string) => Promise; srpAttributes?: SRPAttributes; }