From 423c3e6d48d188418b98e22a99a3d1aad22607bc Mon Sep 17 00:00:00 2001 From: Lukas Date: Tue, 7 Jan 2025 00:59:33 +0100 Subject: [PATCH] fix(app): pass correct type --- app/src/lib/components/TransferFrom/transfer/validation.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/lib/components/TransferFrom/transfer/validation.ts b/app/src/lib/components/TransferFrom/transfer/validation.ts index 9ec3f686de..0b29a5ab09 100644 --- a/app/src/lib/components/TransferFrom/transfer/validation.ts +++ b/app/src/lib/components/TransferFrom/transfer/validation.ts @@ -50,8 +50,8 @@ export function createValidationStore( if (hasAllRequiredValues) { const parseInput = { ...formFields, - balance: $intents.selectedAsset.balance?.toString(), - decimals: $intents.selectedAsset?.decimals + balance: $intents.selectedAsset.balance ?? 0n, + decimals: $intents.selectedAsset.decimals ?? 0 } const schemaResult = safeParse(transferSchema, parseInput) schemaValid = schemaResult.success @@ -89,7 +89,7 @@ export function createValidationStore( const parseInput = { ...formFields, balance: selectedAsset.balance ?? 0n, - decimals: selectedAsset.supported?.decimals ?? 0 + decimals: selectedAsset.decimals ?? 0 } const schemaResult = safeParse(transferSchema, parseInput)