diff --git a/apps/davi/src/components/ActionsBuilder/SupportedActions/GenericCall/GenericCallParamsMatcher.tsx b/apps/davi/src/components/ActionsBuilder/SupportedActions/GenericCall/GenericCallParamsMatcher.tsx index 5113f499..41c20ba4 100644 --- a/apps/davi/src/components/ActionsBuilder/SupportedActions/GenericCall/GenericCallParamsMatcher.tsx +++ b/apps/davi/src/components/ActionsBuilder/SupportedActions/GenericCall/GenericCallParamsMatcher.tsx @@ -44,7 +44,7 @@ export const renderGenericCallParamValue = ( return `${param.value}`; case 'tokenAmount': // TODO: Handle number of decimals better - const number = BigNumber.from(param.value); + const number = BigNumber.from(param.value ?? 0); let formatted = Number.parseFloat(formatUnits(number, 18)); return Math.round(formatted * Math.pow(10, 4)) / Math.pow(10, 4); case 'contentHash': diff --git a/apps/davi/src/utils/encodingCalls.ts b/apps/davi/src/utils/encodingCalls.ts index 1d2e44d7..a6fb43d5 100644 --- a/apps/davi/src/utils/encodingCalls.ts +++ b/apps/davi/src/utils/encodingCalls.ts @@ -102,7 +102,7 @@ export const encodeActions = async ( ...newCall, approval: { ...decodedApprovalCall, - amount: decodedApprovalCall?.args?._value, + amount: decodedApprovalCall?.args?.amount, token: decodedApprovalCall?.to, }, };