From 4ff568891d0a2422d9b74b9061ebeb512bdeec15 Mon Sep 17 00:00:00 2001 From: Moritz Kirstein Date: Thu, 28 Sep 2023 16:27:11 +0200 Subject: [PATCH] fix: approval args --- src/@hooks/useTokenApproval.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@hooks/useTokenApproval.tsx b/src/@hooks/useTokenApproval.tsx index 66dc7a80c..8f72dc3db 100644 --- a/src/@hooks/useTokenApproval.tsx +++ b/src/@hooks/useTokenApproval.tsx @@ -48,7 +48,7 @@ export default function useTokenApproval(): TokenApprovalProviderValue { abi: erc20ABI, functionName: 'approve', args: [ - autoWallet?.wallet?.address as `0x${string}`, + autoWallet?.address as `0x${string}`, ethers.utils.parseUnits(value, 18) ] }) @@ -76,7 +76,7 @@ export default function useTokenApproval(): TokenApprovalProviderValue { abi: erc20ABI, functionName: 'approve', args: [ - autoWallet?.wallet?.address as `0x${string}`, + autoWallet?.address as `0x${string}`, ethers.utils.parseUnits(value, 6) ] })