diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-08-18 05:00:53 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-08-23 06:39:03 +0800 |
commit | 7e0e195c88c407f030754b6050b07698d1868d24 (patch) | |
tree | 656de093a70e465974c8260f6fef0c38125a3d7e | |
parent | e8a1950a7489e83f7f1a1127ee325f0c5c36483c (diff) | |
download | dexon-sol-tools-7e0e195c88c407f030754b6050b07698d1868d24.tar.gz dexon-sol-tools-7e0e195c88c407f030754b6050b07698d1868d24.tar.zst dexon-sol-tools-7e0e195c88c407f030754b6050b07698d1868d24.zip |
Make config public readonly
-rw-r--r-- | packages/forwarder-helper/src/forwarder_helper_impl.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/forwarder-helper/src/forwarder_helper_impl.ts b/packages/forwarder-helper/src/forwarder_helper_impl.ts index 8f4ec1c02..39e84b477 100644 --- a/packages/forwarder-helper/src/forwarder_helper_impl.ts +++ b/packages/forwarder-helper/src/forwarder_helper_impl.ts @@ -20,7 +20,7 @@ export interface ForwarderHelperImplConfig { } export class ForwarderHelperImpl implements ForwarderHelper { - private _config: ForwarderHelperImplConfig; + public readonly config: ForwarderHelperImplConfig; private static _createSignedOrderWithAmounts( orders: SignedOrder[], amounts?: BigNumber[], @@ -76,11 +76,11 @@ export class ForwarderHelperImpl implements ForwarderHelper { }; } constructor(opts: ForwarderHelperImplConfig) { - this._config = ForwarderHelperImpl._sortConfig(opts); + this.config = ForwarderHelperImpl._sortConfig(opts); } public getMarketBuyOrdersInfo(request: MarketBuyOrdersInfoRequest): MarketBuyOrdersInfo { const { makerAssetFillAmount, feePercentage } = request; - const { orders, feeOrders, remainingFillableMakerAssetAmounts, remainingFillableFeeAmounts } = this._config; + const { orders, feeOrders, remainingFillableMakerAssetAmounts, remainingFillableFeeAmounts } = this.config; // TODO: make the slippage percentage customizable const slippageBufferAmount = makerAssetFillAmount.mul(SLIPPAGE_PERCENTAGE); const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount( |