From 76ec5ec20b283493e94faba3dd819ba96a32aa7f Mon Sep 17 00:00:00 2001 From: Marko Arambasic Date: Wed, 27 Nov 2024 18:41:19 +0100 Subject: [PATCH] fix: typescript check error --- packages/app/src/composables/useTransactionData.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app/src/composables/useTransactionData.ts b/packages/app/src/composables/useTransactionData.ts index a1b043529..e0de9d5c6 100644 --- a/packages/app/src/composables/useTransactionData.ts +++ b/packages/app/src/composables/useTransactionData.ts @@ -59,9 +59,9 @@ export function decodeDataWithABI( } } -export function decodeInputData(input: ParamType | null, args: Result): InputData[] { +export function decodeInputData(input: ParamType, args: Result): InputData[] { if (!input) { - return undefined; + throw new Error("input_is_null"); } if (input.isArray()) { @@ -85,7 +85,7 @@ export function decodeInputData(input: ParamType | null, args: Result): InputDat } function decodeArrayInputData(input: ParamType, args: Result): InputData[] { - const inputs = args.flatMap((arg) => decodeInputData(input.arrayChildren, arg)); + const inputs = args.flatMap((arg) => decodeInputData(input.arrayChildren!, arg)); return [ {