Skip to content

Commit

Permalink
Merge pull request #916 from oraichain/fix/add-natives
Browse files Browse the repository at this point in the history
fix add two native
  • Loading branch information
vuonghuuhung authored Aug 10, 2024
2 parents d381497 + 51647d0 commit 9079390
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/Pool-V3/hooks/useAddLiquidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9079390

Please sign in to comment.