UNPKG

rubic-sdk-next

Version:
32 lines 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EvmApiOnChainTrade = void 0; const evm_on_chain_trade_1 = require("../../../on-chain/calculation-manager/common/on-chain-trade/evm-on-chain-trade/evm-on-chain-trade"); class EvmApiOnChainTrade extends evm_on_chain_trade_1.EvmOnChainTrade { get priceImpact() { return this._priceImpact; } constructor(params) { super({ ...params, path: params.routePath, gasFeeInfo: null, useProxy: params.useProxy, slippageTolerance: params.apiResponse.estimate.slippage, withDeflation: { from: { isDeflation: false }, to: { isDeflation: false } }, fromWithoutFee: params.from }); this.onChainSubtype = { from: undefined, to: undefined }; this.isAggregator = false; this.dexContractAddress = params.apiResponse?.transaction.approvalAddress; this.type = params.apiResponse.providerType; this._priceImpact = params.apiResponse.estimate.priceImpact; this.slippage = params.apiResponse.estimate.slippage; this.to = params.to; this.feeInfo = params.feeInfo; this.from = params.from; this.gasData = null; } } exports.EvmApiOnChainTrade = EvmApiOnChainTrade; //# sourceMappingURL=evm-api-on-chain-trade.js.map