Skip to content

Commit

Permalink
fix: add missing gascost
Browse files Browse the repository at this point in the history
  • Loading branch information
Wertusser committed Aug 21, 2024
1 parent 6741adc commit 64f3408
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/dex/integral/integral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class Integral extends SimpleExchange implements IDex<IntegralData> {
},
exchange: this.dexKey,
poolIdentifier,
gasCost: 0,
gasCost: 350_000,
poolAddresses: [props.poolAddress],
},
];
Expand Down Expand Up @@ -220,8 +220,6 @@ export class Integral extends SimpleExchange implements IDex<IntegralData> {
_: Context,
executorAddress: Address,
): DexExchangeParam {
const { relayer: exchange } = data;

const tokenIn = this.dexHelper.config.wrapETH(srcToken);
const tokenOut = this.dexHelper.config.wrapETH(destToken);

Expand All @@ -247,15 +245,13 @@ export class Integral extends SimpleExchange implements IDex<IntegralData> {
needWrapNative: this.needWrapNative,
dexFuncHasRecipient: true,
exchangeData: swapData,
targetExchange: exchange,
targetExchange: this.context.relayerAddress,
returnAmountPos: undefined,
};
}

async updatePoolState(): Promise<void> {}

// Returns list of top pools based on liquidity. Max
// limit number pools should be returned.
async getTopPoolsForToken(
tokenAddress: Address,
limit: number,
Expand Down Expand Up @@ -399,7 +395,8 @@ export class Integral extends SimpleExchange implements IDex<IntegralData> {

const states = this.getStates(poolId, blockNumber);
if (!states) {
return await this.getPriceOnChain(src, dest, inverted, blockNumber);
const resp = await this.getPriceOnChain(src, dest, inverted, blockNumber);
return resp;
}

const { base, poolAddress, relayer, relayerTokens } = states;
Expand Down

0 comments on commit 64f3408

Please sign in to comment.