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

@@ -57,16 +57,16 @@ export const getFullyFillableSwapQuoteWithNoFees = (
worstCaseQuoteInfo: quoteInfo,
};
if (operation === 'marketBuy') {
if (operation === MarketOperation.Buy) {
return {
...quoteBase,
type: 'marketBuy',
type: MarketOperation.Buy,
makerAssetFillAmount,
};
} else {
return {
...quoteBase,
type: 'marketSell',
type: MarketOperation.Sell,
takerAssetFillAmount: totalTakerTokenAmount,
};
}