diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-10-04 14:46:07 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-10-04 14:46:07 +0800 |
commit | 4394036e341e9755a57a29680f5b14f3c92fef9c (patch) | |
tree | 0aedba6612aab82866f789caf4d7eaea25e7ba41 | |
parent | a7a007435cfefc8146246c0db66efdee05c809b8 (diff) | |
download | dexon-sol-tools-4394036e341e9755a57a29680f5b14f3c92fef9c.tar dexon-sol-tools-4394036e341e9755a57a29680f5b14f3c92fef9c.tar.gz dexon-sol-tools-4394036e341e9755a57a29680f5b14f3c92fef9c.tar.bz2 dexon-sol-tools-4394036e341e9755a57a29680f5b14f3c92fef9c.tar.lz dexon-sol-tools-4394036e341e9755a57a29680f5b14f3c92fef9c.tar.xz dexon-sol-tools-4394036e341e9755a57a29680f5b14f3c92fef9c.tar.zst dexon-sol-tools-4394036e341e9755a57a29680f5b14f3c92fef9c.zip |
Add missing default options
-rw-r--r-- | packages/asset-buyer/src/asset_buyer.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/asset-buyer/src/asset_buyer.ts b/packages/asset-buyer/src/asset_buyer.ts index 0bb757f52..a56bc01d5 100644 --- a/packages/asset-buyer/src/asset_buyer.ts +++ b/packages/asset-buyer/src/asset_buyer.ts @@ -123,7 +123,7 @@ export class AssetBuyer { public async getBuyQuoteAsync( assetData: string, assetBuyAmount: BigNumber, - options: Partial<BuyQuoteRequestOpts>, + options: Partial<BuyQuoteRequestOpts> = {}, ): Promise<BuyQuote> { const { feePercentage, shouldForceOrderRefresh, slippagePercentage } = { ...constants.DEFAULT_BUY_QUOTE_REQUEST_OPTS, @@ -164,7 +164,7 @@ export class AssetBuyer { public async getBuyQuoteForERC20TokenAddressAsync( tokenAddress: string, assetBuyAmount: BigNumber, - options: Partial<BuyQuoteRequestOpts>, + options: Partial<BuyQuoteRequestOpts> = {}, ): Promise<BuyQuote> { assert.isETHAddressHex('tokenAddress', tokenAddress); assert.isBigNumber('assetBuyAmount', assetBuyAmount); @@ -179,7 +179,10 @@ export class AssetBuyer { * * @return A promise of the txHash. */ - public async executeBuyQuoteAsync(buyQuote: BuyQuote, options: Partial<BuyQuoteExecutionOpts>): Promise<string> { + public async executeBuyQuoteAsync( + buyQuote: BuyQuote, + options: Partial<BuyQuoteExecutionOpts> = {}, + ): Promise<string> { const { rate, takerAddress, feeRecipient } = { ...constants.DEFAULT_BUY_QUOTE_EXECUTION_OPTS, ...options, |