Skip to content

Commit

Permalink
fix: use wrap tokens for preProcessTransaction on Bebop
Browse files Browse the repository at this point in the history
  • Loading branch information
KanievskyiDanylo committed Jan 17, 2025
1 parent b4dcd3e commit 1666d28
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/dex/bebop/bebop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,14 +697,17 @@ export class Bebop extends SimpleExchange implements IDex<BebopData> {

async preProcessTransaction(
optimalSwapExchange: OptimalSwapExchange<BebopData>,
srcToken: Token,
destToken: Token,
_srcToken: Token,
_destToken: Token,
side: SwapSide,
options: PreprocessTransactionOptions,
): Promise<[OptimalSwapExchange<BebopData>, ExchangeTxInfo]> {
const isSell = side === SwapSide.SELL;
const isBuy = side === SwapSide.BUY;

const srcToken = this.dexHelper.config.wrapETH(_srcToken);
const destToken = this.dexHelper.config.wrapETH(_destToken);

const params = {
sell_tokens: utils.getAddress(srcToken.address),
buy_tokens: utils.getAddress(destToken.address),
Expand Down

0 comments on commit 1666d28

Please sign in to comment.