diff --git a/apps/wallet/package.json b/apps/wallet/package.json index 6a78d5b9a3b86..dea2c6ac3d3be 100644 --- a/apps/wallet/package.json +++ b/apps/wallet/package.json @@ -121,6 +121,7 @@ "@mysten/sui.js": "workspace:*", "@mysten/wallet-standard": "workspace:*", "@noble/hashes": "^1.3.1", + "@radix-ui/react-checkbox": "^1.0.4", "@reduxjs/toolkit": "^1.9.5", "@scure/bip32": "^1.3.1", "@scure/bip39": "^1.2.1", diff --git a/apps/wallet/src/ui/app/components/accounts/ImportPrivateKeyForm.tsx b/apps/wallet/src/ui/app/components/accounts/ImportPrivateKeyForm.tsx index 73d0c07afd599..2da561b16a4c3 100644 --- a/apps/wallet/src/ui/app/components/accounts/ImportPrivateKeyForm.tsx +++ b/apps/wallet/src/ui/app/components/accounts/ImportPrivateKeyForm.tsx @@ -6,9 +6,9 @@ import { useForm, type SubmitHandler } from 'react-hook-form'; import { useNavigate } from 'react-router-dom'; import * as Yup from 'yup'; import { privateKeyValidation } from '../../helpers/validation/privateKeyValidation'; +import { Form } from '../../shared/forms/Form'; +import { TextAreaField } from '../../shared/forms/TextAreaField'; import { Button } from '_app/shared/ButtonUI'; -import Alert from '_src/ui/app/components/alert'; -import { Text } from '_src/ui/app/shared/text'; const formSchema = Yup.object({ privateKey: privateKeyValidation, @@ -21,33 +21,19 @@ type ImportPrivateKeyFormProps = { }; export function ImportPrivateKeyForm({ onSubmit }: ImportPrivateKeyFormProps) { - const { - register, - handleSubmit, - formState: { isSubmitting, isValid, touchedFields, errors }, - } = useForm({ + const form = useForm({ mode: 'onTouched', resolver: yupResolver(formSchema), }); + const { + register, + formState: { isSubmitting, isValid }, + } = form; const navigate = useNavigate(); return ( -
-