From 51647d0b60581ad7f853550e8867c0bd0f47ab6b Mon Sep 17 00:00:00 2001 From: vuonghuuhung Date: Sat, 10 Aug 2024 19:19:04 +0700 Subject: [PATCH] fix add two native --- src/pages/Pool-V3/hooks/useAddLiquidity.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Pool-V3/hooks/useAddLiquidity.ts b/src/pages/Pool-V3/hooks/useAddLiquidity.ts index ed9081348..42325307c 100644 --- a/src/pages/Pool-V3/hooks/useAddLiquidity.ts +++ b/src/pages/Pool-V3/hooks/useAddLiquidity.ts @@ -34,10 +34,10 @@ const useAddLiquidity = () => { let listTokenApprove = []; if (!isNativeToken(token_x)) listTokenApprove.push(token_x); if (!isNativeToken(token_y)) listTokenApprove.push(token_y); - - const msg = genMsgAllowance(listTokenApprove); - - await approveListToken(msg, walletAddress); + if (listTokenApprove.length > 0) { + const msg = genMsgAllowance(listTokenApprove); + await approveListToken(msg, walletAddress); + } const poolKey = newPoolKey(token_x, token_y, fee_tier);