Skip to content

Commit

Permalink
fix creare2-address-form
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehor Podporinov authored and Yehor Podporinov committed Sep 15, 2023
1 parent 1bb0412 commit 4756e77
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions forms/Create2AddressForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@
@blur="touchField('accountAddress')"
/>
<input-field
v-model="form.salt"
:label="$t('create2-address-form.salt-label')"
:placeholder="$t('create2-address-form.salt-placeholder')"
/>
<textarea-field
v-model="form.contractInitCode"
:label="$t('create2-address-form.contract-code-label')"
:placeholder="$t('create2-address-form.contract-code-placeholder')"
:error-message="getFieldErrorMessage('contractInitCode')"
@blur="touchField('contractInitCode')"
/>
<input-field
v-model="form.salt"
:label="$t('create2-address-form.salt-label')"
:placeholder="$t('create2-address-form.salt-placeholder')"
:error-message="getFieldErrorMessage('salt')"
@blur="touchField('salt')"
/>
</div>
</div>
<div class="create2-address-form__output">
Expand All @@ -45,7 +43,7 @@
<script lang="ts" setup>
import { AppCopy } from '#components'
import { useFormValidation } from '@/composables'
import { InputField } from '@/fields'
import { InputField, TextareaField } from '@/fields'
import {
ErrorHandler,
address,
Expand All @@ -60,16 +58,15 @@ import { reactive, ref, watch } from 'vue'
const contractAddress = ref('')
const form = reactive({
accountAddress: '',
contractInitCode: '',
salt: '',
contractInitCode: '',
})
const { isFormValid, getFieldErrorMessage, touchField } = useFormValidation(
form,
{
accountAddress: { required, address },
contractInitCode: { required, hexadecimal },
salt: { required },
},
)
Expand Down

0 comments on commit 4756e77

Please sign in to comment.