Skip to content

Commit

Permalink
CP-9556: Use correct gas limit for swap (#2124)
Browse files Browse the repository at this point in the history
  • Loading branch information
atn4z7 authored Nov 25, 2024
1 parent c0946d2 commit d1f7f7f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d1f7f7f

Please sign in to comment.