From d1f7f7fbd896df963d49a7e3dc80dfa5b609fbd4 Mon Sep 17 00:00:00 2001 From: An Nguyen Date: Mon, 25 Nov 2024 09:23:28 -0600 Subject: [PATCH] CP-9556: Use correct gas limit for swap (#2124) --- .../app/contexts/SwapContext/performSwap/performSwap.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core-mobile/app/contexts/SwapContext/performSwap/performSwap.ts b/packages/core-mobile/app/contexts/SwapContext/performSwap/performSwap.ts index 02efc59b6..59d612425 100644 --- a/packages/core-mobile/app/contexts/SwapContext/performSwap/performSwap.ts +++ b/packages/core-mobile/app/contexts/SwapContext/performSwap/performSwap.ts @@ -186,8 +186,10 @@ export async function performSwap({ { from: userAddress, to: txBuildData.to, - // @ts-ignore - gas: bigIntToHex(txBuildData.gas), //gas property is not defined in Transaction@paraswap type but api does return this prop + gas: + txBuildData.gas !== undefined + ? bigIntToHex(BigInt(txBuildData.gas)) + : undefined, data: txBuildData.data, value: isSrcTokenNative ? bigIntToHex(BigInt(sourceAmount)) : undefined // AVAX value needs to be sent with the transaction }