@@ -8,7 +8,7 @@ import { CreateVaultSchema } from 'features/create-vault/types';
88import {
99 CREATE_VAULT_FORM_STEPS ,
1010 CREATE_VAULT_STEPS ,
11- getSectionNameByStep ,
11+ SECTION_NAMES_BY_STEP ,
1212} from 'features/create-vault/consts' ;
1313
1414import { createVaultSchema } from './validation' ;
@@ -22,22 +22,19 @@ import { FormTitle, FormBlock, FormSubtitle } from './styles';
2222
2323import type { Address } from 'viem' ;
2424
25- const defaultValues : CreateVaultSchema = {
26- nodeOperator : '' as Address ,
27- vaultManager : [ { value : '' as Address } ] ,
28- nodeOperatorManager : '' as Address ,
29- nodeOperatorFeeBP : '' as unknown as number ,
30- confirmExpiry : 36 ,
31- acceptTerms : false ,
32- roles : { } ,
33- step : CREATE_VAULT_FORM_STEPS . main ,
34- } ;
35-
3625export const CreateVaultForm : FC < PropsWithChildren > = ( ) => {
3726 const formObject = useForm ( {
38- defaultValues,
27+ defaultValues : {
28+ nodeOperator : '' as Address ,
29+ vaultManager : [ { value : '' as Address } ] ,
30+ nodeOperatorManager : '' as Address ,
31+ nodeOperatorFeeBP : undefined ,
32+ confirmExpiry : 36 ,
33+ acceptTerms : false ,
34+ roles : { } ,
35+ step : CREATE_VAULT_FORM_STEPS . main ,
36+ } ,
3937 mode : 'onTouched' ,
40-
4138 resolver : zodResolver ( createVaultSchema , { async : true } ) ,
4239 } ) ;
4340
@@ -64,7 +61,7 @@ export const CreateVaultForm: FC<PropsWithChildren> = () => {
6461 < FormSubtitle >
6562 Step { step } of { CREATE_VAULT_STEPS }
6663 </ FormSubtitle >
67- < FormTitle > { getSectionNameByStep ( step ) } </ FormTitle >
64+ < FormTitle > { SECTION_NAMES_BY_STEP [ step ] } </ FormTitle >
6865 < MainSettings isShown = { step === CREATE_VAULT_FORM_STEPS . main } />
6966 < Confirmation
7067 isShown = { step === CREATE_VAULT_FORM_STEPS . confirm }
0 commit comments