diff --git a/src/pages/stamps/PostageStampCreation.tsx b/src/pages/stamps/PostageStampCreation.tsx index 3e8dc29..cff489d 100644 --- a/src/pages/stamps/PostageStampCreation.tsx +++ b/src/pages/stamps/PostageStampCreation.tsx @@ -119,14 +119,14 @@ export function PostageStampCreation({ onFinished }: Props): ReactElement { return errors }} > - {({ submitForm, isValid, isSubmitting, values }) => ( + {({ submitForm, isValid, isSubmitting, values, errors }) => (
Corresponding file size - {getFileSize(parseInt(values.depth || '0', 10))} + {!errors.depth && values.depth ? getFileSize(parseInt(values.depth, 10)) : '-'} @@ -135,7 +135,9 @@ export function PostageStampCreation({ onFinished }: Props): ReactElement { Corresponding TTL (Time to live) - {getTtl(Number.parseInt(values.amount || '0', 10))} + + {!errors.amount && values.amount ? getTtl(Number.parseInt(values.amount, 10)) : '-'} + @@ -145,7 +147,11 @@ export function PostageStampCreation({ onFinished }: Props): ReactElement { Indicative Price - {getPrice(parseInt(values.depth || '0', 10), BigInt(values.amount || '0'))} + + {!errors.amount && !errors.depth && values.amount && values.depth + ? getPrice(parseInt(values.depth, 10), BigInt(values.amount)) + : '-'} +