changed market-operation type to enum from literal

This commit is contained in:
David Sun
2019-07-15 15:29:13 -07:00
parent ac82b2622c
commit 542255332d
11 changed files with 50 additions and 44 deletions

View File

@@ -144,7 +144,7 @@ export class SwapQuoter {
makerAssetData,
takerAssetData,
takerAssetSellAmount,
'marketSell',
MarketOperation.Sell,
options,
)) as MarketSellSwapQuote;
}
@@ -170,7 +170,7 @@ export class SwapQuoter {
makerAssetData,
takerAssetData,
makerAssetBuyAmount,
'marketBuy',
MarketOperation.Buy,
options,
)) as MarketBuySwapQuote;
}
@@ -423,7 +423,7 @@ export class SwapQuoter {
let swapQuote: SwapQuote;
if (marketOperation === 'marketBuy') {
if (marketOperation === MarketOperation.Buy) {
swapQuote = swapQuoteCalculator.calculateMarketBuySwapQuote(
ordersAndFillableAmounts,
feeOrdersAndFillableAmounts,