π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Apply lints
Manav Rathi04a8bd620930
diff --git a/web/packages/accounts/pages/generate.tsx b/web/packages/accounts/pages/generate.tsxindex bea4416139..9e7544b4d9 100644--- a/web/packages/accounts/pages/generate.tsx+++ b/web/packages/accounts/pages/generate.tsx@@ -43,30 +43,27 @@ const Page: React.FC<PageProps> = ({ appContext }) => {const router = useRouter();useEffect(() => {- const main = async () => {- const key: string = getKey(SESSION_KEYS.ENCRYPTION_KEY);- const keyAttributes: KeyAttributes = getData(- LS_KEYS.ORIGINAL_KEY_ATTRIBUTES,- );- const user: User = getData(LS_KEYS.USER);- setUser(user);- if (!user?.token) {- void router.push("/");- } else if (key) {- if (justSignedUp()) {- setOpenRecoveryKey(true);- setLoading(false);- } else {- void router.push(appHomeRoute);- }- } else if (keyAttributes?.encryptedKey) {- void router.push(PAGES.CREDENTIALS);- } else {- setToken(user.token);+ const key: string = getKey(SESSION_KEYS.ENCRYPTION_KEY);+ const keyAttributes: KeyAttributes = getData(+ LS_KEYS.ORIGINAL_KEY_ATTRIBUTES,+ );+ const user: User = getData(LS_KEYS.USER);+ setUser(user);+ if (!user?.token) {+ void router.push("/");+ } else if (key) {+ if (justSignedUp()) {+ setOpenRecoveryKey(true);setLoading(false);+ } else {+ void router.push(appHomeRoute);}- };- void main();+ } else if (keyAttributes?.encryptedKey) {+ void router.push(PAGES.CREDENTIALS);+ } else {+ setToken(user.token);+ setLoading(false);+ }appContext.showNavBar(true);}, []);diff --git a/web/packages/accounts/services/passkey.ts b/web/packages/accounts/services/passkey.tsindex a15b5ec0a9..8269f95036 100644--- a/web/packages/accounts/services/passkey.ts+++ b/web/packages/accounts/services/passkey.ts@@ -142,7 +142,7 @@ export const isPasskeyRecoveryEnabled = async () => {throw Error("request failed");}- return resp.data["isPasskeyRecoveryEnabled"] as boolean;+ return resp.data.isPasskeyRecoveryEnabled as boolean;} catch (e) {log.error("failed to get passkey recovery status", e);throw e;@@ -194,7 +194,7 @@ const getAccountsToken = async () => {"X-Auth-Token": token,},);- return resp.data["accountsToken"];+ return resp.data.accountsToken;};/**diff --git a/web/packages/accounts/services/srp.ts b/web/packages/accounts/services/srp.tsindex 9840332b38..319e3e8ef1 100644--- a/web/packages/accounts/services/srp.ts+++ b/web/packages/accounts/services/srp.ts@@ -154,6 +154,7 @@ export const generateSRPClient = async (resolve(srpClient);} catch (e) {+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errorsreject(e);}});