rubic-sdk-next
Version:
Simplify dApp creation
35 lines • 1.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TonApiOnChainTrade = void 0;
const ton_on_chain_trade_1 = require("../../../on-chain/calculation-manager/common/on-chain-trade/ton-on-chain-trade/ton-on-chain-trade");
class TonApiOnChainTrade extends ton_on_chain_trade_1.TonOnChainTrade {
get priceImpact() {
return this._priceImpact;
}
constructor(params) {
super({
...params,
slippageTolerance: params.apiQuote.slippage || 0,
gasFeeInfo: null,
useProxy: false,
withDeflation: { from: { isDeflation: false }, to: { isDeflation: false } },
routingPath: params.routePath,
isChangedSlippage: params.isChangedSlippage
}, params.apiQuote.integratorAddress);
this.onChainSubtype = { from: undefined, to: undefined };
this.dexContractAddress = '';
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;
}
calculateOutputAmount(_options) {
// @TODO API
throw new Error('Not implemented');
}
}
exports.TonApiOnChainTrade = TonApiOnChainTrade;
//# sourceMappingURL=ton-api-on-chain-trade.js.map