diff --git a/src/api/schemas/strNumber.ts b/src/api/schemas/strNumber.ts index 2626b67..759a0a0 100644 --- a/src/api/schemas/strNumber.ts +++ b/src/api/schemas/strNumber.ts @@ -10,6 +10,6 @@ export const BigIntStringSchema = z.custom((a) => { }); export const BigIntMin = (min: bigint) => - z.custom((a) => BigInt(a) >= min, { + z.custom((a) => a && BigInt(a) >= min, { message: `Should be greater than or equal to ${String(min)}`, }); diff --git a/src/components/sendTx/ConfirmationModal.tsx b/src/components/sendTx/ConfirmationModal.tsx index b9dc7c9..e129cbd 100644 --- a/src/components/sendTx/ConfirmationModal.tsx +++ b/src/components/sendTx/ConfirmationModal.tsx @@ -77,6 +77,7 @@ type ConfirmationModalProps = ConfirmationData & { isOpen: boolean; estimatedGas: bigint | null; isLedgerRejected?: boolean; + insufficientFunds: string; }; const renderTemplateSpecificFields = (form: FormValues) => { @@ -222,6 +223,7 @@ function ConfirmationModal({ signatures = undefined, required = 1, isMultiSig = false, + insufficientFunds, isOpen, onClose, onSubmit, @@ -320,7 +322,13 @@ function ConfirmationModal({ if (!isMultiSig) { return ( - @@ -349,10 +357,11 @@ function ConfirmationModal({ return (