This commit is contained in:
Manav Rathi 2024-05-26 18:22:07 +05:30
parent d3d3e4dbed
commit b99c573d3a
No known key found for this signature in database
2 changed files with 12 additions and 5 deletions

View file

@ -30,7 +30,9 @@ const bip39 = require("bip39");
bip39.setDefaultWordlist("english"); bip39.setDefaultWordlist("english");
const Page: React.FC<PageProps> = ({ appContext }) => { const Page: React.FC<PageProps> = ({ appContext }) => {
const appNameOld = appNameToAppNameOld(appContext.appName); const { appName } = appContext;
const appNameOld = appNameToAppNameOld(appName);
const [keyAttributes, setKeyAttributes] = useState< const [keyAttributes, setKeyAttributes] = useState<
KeyAttributes | undefined KeyAttributes | undefined

View file

@ -1,5 +1,6 @@
import { ensure } from "@/utils/ensure"; import { ensure } from "@/utils/ensure";
import type { UserVerificationResponse } from "@ente/accounts/types/user"; import type { UserVerificationResponse } from "@ente/accounts/types/user";
import { appNameToAppNameOld } from "@ente/shared/apps/constants";
import type { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner"; import EnteSpinner from "@ente/shared/components/EnteSpinner";
@ -32,8 +33,10 @@ import { PAGES } from "../constants/pages";
import { configureSRP } from "../services/srp"; import { configureSRP } from "../services/srp";
import type { SRPSetupAttributes } from "../types/srp"; import type { SRPSetupAttributes } from "../types/srp";
export default function VerifyPage({ appContext, appName }: PageProps) { const Page: React.FC<PageProps> = ({ appContext }) => {
const { logout } = appContext; const { appName, logout } = appContext;
const appNameOld = appNameToAppNameOld(appName);
const [email, setEmail] = useState(""); const [email, setEmail] = useState("");
const [resend, setResend] = useState(0); const [resend, setResend] = useState(0);
@ -148,7 +151,7 @@ export default function VerifyPage({ appContext, appName }: PageProps) {
const resendEmail = async () => { const resendEmail = async () => {
setResend(1); setResend(1);
await sendOtt(appName, email); await sendOtt(appNameOld, email);
setResend(2); setResend(2);
setTimeout(() => setResend(0), 3000); setTimeout(() => setResend(0), 3000);
}; };
@ -199,4 +202,6 @@ export default function VerifyPage({ appContext, appName }: PageProps) {
</FormPaper> </FormPaper>
</VerticallyCentered> </VerticallyCentered>
); );
} };
export default Page;