diff --git a/web/packages/accounts/pages/recover.tsx b/web/packages/accounts/pages/recover.tsx index 53596ef6c..a93cf53cc 100644 --- a/web/packages/accounts/pages/recover.tsx +++ b/web/packages/accounts/pages/recover.tsx @@ -30,7 +30,9 @@ const bip39 = require("bip39"); bip39.setDefaultWordlist("english"); const Page: React.FC = ({ appContext }) => { - const appNameOld = appNameToAppNameOld(appContext.appName); + const { appName } = appContext; + + const appNameOld = appNameToAppNameOld(appName); const [keyAttributes, setKeyAttributes] = useState< KeyAttributes | undefined diff --git a/web/packages/accounts/pages/verify.tsx b/web/packages/accounts/pages/verify.tsx index 2fff513be..025b39961 100644 --- a/web/packages/accounts/pages/verify.tsx +++ b/web/packages/accounts/pages/verify.tsx @@ -1,5 +1,6 @@ import { ensure } from "@/utils/ensure"; import type { UserVerificationResponse } from "@ente/accounts/types/user"; +import { appNameToAppNameOld } from "@ente/shared/apps/constants"; import type { PageProps } from "@ente/shared/apps/types"; import { VerticallyCentered } from "@ente/shared/components/Container"; import EnteSpinner from "@ente/shared/components/EnteSpinner"; @@ -32,8 +33,10 @@ import { PAGES } from "../constants/pages"; import { configureSRP } from "../services/srp"; import type { SRPSetupAttributes } from "../types/srp"; -export default function VerifyPage({ appContext, appName }: PageProps) { - const { logout } = appContext; +const Page: React.FC = ({ appContext }) => { + const { appName, logout } = appContext; + + const appNameOld = appNameToAppNameOld(appName); const [email, setEmail] = useState(""); const [resend, setResend] = useState(0); @@ -148,7 +151,7 @@ export default function VerifyPage({ appContext, appName }: PageProps) { const resendEmail = async () => { setResend(1); - await sendOtt(appName, email); + await sendOtt(appNameOld, email); setResend(2); setTimeout(() => setResend(0), 3000); }; @@ -199,4 +202,6 @@ export default function VerifyPage({ appContext, appName }: PageProps) { ); -} +}; + +export default Page;