Skip to content

Commit b04f9f9

Browse files
committed
fix: prevent validation errors from obstructing help text and add address field help text
1 parent 1eeb551 commit b04f9f9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/features/abi-methods/mappers/form-item-mappers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const abiTypeToFormItem = (
7171
return formFieldHelper.addressField({
7272
label: 'Value',
7373
field: `${path}` as Path<any>,
74+
helpText: 'An Algorand address string',
7475
})
7576
}
7677
if (type instanceof algosdk.ABIArrayDynamicType) {
@@ -131,6 +132,7 @@ export const abiReferenceTypeToFormItem = (formFieldHelper: FormFieldHelper<any>
131132
return formFieldHelper.addressField({
132133
label: 'Value',
133134
field: `${path}` as Path<any>,
135+
helpText: 'An Algorand address string',
134136
})
135137
}
136138

src/features/app-interfaces/components/create/deployment-details.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function FormInner({
7272
(appInterface) => appInterface.name.toLowerCase() === appInterfaceName.toLowerCase()
7373
)
7474
setValue('appInterfaceExists', appInterfaceExists)
75-
trigger()
75+
trigger('name')
7676
}
7777
}, [appInterfaceName, loadableAppInterfaces, setValue, trigger])
7878

@@ -201,7 +201,9 @@ export function DeploymentDetails({ machine }: Props) {
201201
return {
202202
...acc,
203203
[field.path]: state.context.templateParams
204-
? field.fromTemplateParam(state.context.templateParams[index] as UnknownTypeTemplateParam & AVMTypeTemplateParam & ABITypeTemplateParam)
204+
? field.fromTemplateParam(
205+
state.context.templateParams[index] as UnknownTypeTemplateParam & AVMTypeTemplateParam & ABITypeTemplateParam
206+
)
205207
: 'defaultValue' in field
206208
? field.defaultValue
207209
: {

0 commit comments

Comments
 (0)