diff --git a/src/pages/stamps/CreatePostageStampModal.tsx b/src/pages/stamps/CreatePostageStampModal.tsx index 6a9084f..14c3480 100644 --- a/src/pages/stamps/CreatePostageStampModal.tsx +++ b/src/pages/stamps/CreatePostageStampModal.tsx @@ -63,7 +63,8 @@ export default function FormDialog({ label }: Props): ReactElement { initialValues={initialFormValues} onSubmit={async (values: FormValues, actions: FormikHelpers) => { try { - if (!values.depth) return + // This is really just a typeguard, the validation pretty much guarantees these will have the right values + if (!values.depth || !values.amount) return const amount = BigInt(values.amount) const depth = Number.parseInt(values.depth) @@ -105,7 +106,7 @@ export default function FormDialog({ label }: Props): ReactElement { return errors }} > - {({ submitForm, isValid, isSubmitting }) => ( + {({ submitForm, isValid, isSubmitting, values }) => (