Skip to content

Commit

Permalink
fix: dont explicitly wrap eth (#62)
Browse files Browse the repository at this point in the history
* dont explicitly wrap eth

* clarify comment

* comments lol
  • Loading branch information
steezeburger authored Feb 12, 2025
1 parent f2347d8 commit 9205e75
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ export class SwapRouter {
const calls: string[] = [];
let value = 0n;

// add wrapETH call if needed
if (isNativeIn) {
calls.push(this.encodeWrapETHCall(trade.inputAmount.raw.toString()));
// if isNativeIn then we need to send TIA to the contract, so set the value accordingly
// NOTE - we don't need to explicitly wrap ETH, the router's callback will do it for us
value = BigInt(trade.inputAmount.raw.toString());
}

Expand Down

0 comments on commit 9205e75

Please sign in to comment.