From 64f34087137599ec06b32ee16e43728b1852f999 Mon Sep 17 00:00:00 2001 From: Georgii Molchanov Date: Wed, 21 Aug 2024 10:06:40 +0100 Subject: [PATCH] fix: add missing gascost --- src/dex/integral/integral.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/dex/integral/integral.ts b/src/dex/integral/integral.ts index e863cb0d6..f40f6a718 100644 --- a/src/dex/integral/integral.ts +++ b/src/dex/integral/integral.ts @@ -168,7 +168,7 @@ export class Integral extends SimpleExchange implements IDex { }, exchange: this.dexKey, poolIdentifier, - gasCost: 0, + gasCost: 350_000, poolAddresses: [props.poolAddress], }, ]; @@ -220,8 +220,6 @@ export class Integral extends SimpleExchange implements IDex { _: Context, executorAddress: Address, ): DexExchangeParam { - const { relayer: exchange } = data; - const tokenIn = this.dexHelper.config.wrapETH(srcToken); const tokenOut = this.dexHelper.config.wrapETH(destToken); @@ -247,15 +245,13 @@ export class Integral extends SimpleExchange implements IDex { needWrapNative: this.needWrapNative, dexFuncHasRecipient: true, exchangeData: swapData, - targetExchange: exchange, + targetExchange: this.context.relayerAddress, returnAmountPos: undefined, }; } async updatePoolState(): Promise {} - // Returns list of top pools based on liquidity. Max - // limit number pools should be returned. async getTopPoolsForToken( tokenAddress: Address, limit: number, @@ -399,7 +395,8 @@ export class Integral extends SimpleExchange implements IDex { 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;