diff --git a/apps/extension/src/routes/page/onboarding/import.tsx b/apps/extension/src/routes/page/onboarding/import.tsx
index 2cd987086b..42c909829b 100644
--- a/apps/extension/src/routes/page/onboarding/import.tsx
+++ b/apps/extension/src/routes/page/onboarding/import.tsx
@@ -14,11 +14,17 @@ import { importSelector } from '../../../state/seed-phrase/import';
import { usePageNav } from '../../../utils/navigate';
import { PagePath } from '../paths';
import { ImportForm } from '../../../shared';
+import { FormEvent, MouseEvent } from 'react';
export const ImportSeedPhrase = () => {
const navigate = usePageNav();
const { phrase, phraseIsValid } = useStore(importSelector);
+ const handleSubmit = (event: MouseEvent | FormEvent) => {
+ event.preventDefault();
+ navigate(PagePath.SET_PASSWORD);
+ };
+
return (
navigate(-1)} />
@@ -29,20 +35,22 @@ export const ImportSeedPhrase = () => {
Feel free to paste it into the first box and the rest will fill
-
-
-
+
+
diff --git a/apps/extension/src/routes/page/onboarding/set-password.tsx b/apps/extension/src/routes/page/onboarding/set-password.tsx
index 10e983fc3f..0058542aff 100644
--- a/apps/extension/src/routes/page/onboarding/set-password.tsx
+++ b/apps/extension/src/routes/page/onboarding/set-password.tsx
@@ -1,4 +1,4 @@
-import { useState } from 'react';
+import { FormEvent, MouseEvent, useState } from 'react';
import {
BackIcon,
Button,
@@ -20,6 +20,15 @@ export const SetPassword = () => {
const [password, setPassword] = useState('');
const [confirmation, setConfirmation] = useState('');
+ const handleSubmit = (event: FormEvent | MouseEvent) => {
+ event.preventDefault();
+
+ void (async () => {
+ await finalOnboardingSave(password);
+ navigate(PagePath.ONBOARDING_SUCCESS);
+ })();
+ };
+
return (
navigate(-1)} />
@@ -31,44 +40,34 @@ export const SetPassword = () => {
wallet.
-
- setPassword(value)}
- validations={[
- {
- type: 'warn',
- issue: 'password too short',
- checkFn: (txt: string) => Boolean(txt.length) && txt.length < 8,
- },
- ]}
- />
- setConfirmation(value)}
- validations={[
- {
- type: 'warn',
- issue: "passwords don't match",
- checkFn: (txt: string) => Boolean(txt.length) && password !== txt,
- },
- ]}
- />
-
+
+
diff --git a/apps/extension/src/routes/page/restore-password/set-password.tsx b/apps/extension/src/routes/page/restore-password/set-password.tsx
index 10e983fc3f..55aae768c6 100644
--- a/apps/extension/src/routes/page/restore-password/set-password.tsx
+++ b/apps/extension/src/routes/page/restore-password/set-password.tsx
@@ -36,13 +36,6 @@ export const SetPassword = () => {
passwordValue={password}
label='New password'
onChange={({ target: { value } }) => setPassword(value)}
- validations={[
- {
- type: 'warn',
- issue: 'password too short',
- checkFn: (txt: string) => Boolean(txt.length) && txt.length < 8,
- },
- ]}
/>
{
{
type: 'warn',
issue: "passwords don't match",
- checkFn: (txt: string) => Boolean(txt.length) && password !== txt,
+ checkFn: (txt: string) => password !== txt,
},
]}
/>