Merge pull request #2566 from 0xProject/fix/dangling-promises-asset-swapper

[asset-swapper] Fixed dangling promises
This commit is contained in:
Alex Towle
2020-04-24 16:53:30 -05:00
committed by GitHub

View File

@@ -309,13 +309,12 @@ export class SwapQuoter {
assert.isBigNumber('makerAssetBuyAmount', makerAssetBuyAmount);
const makerAssetData = assetDataUtils.encodeERC20AssetData(makerTokenAddress);
const takerAssetData = assetDataUtils.encodeERC20AssetData(takerTokenAddress);
const swapQuote = this.getMarketBuySwapQuoteForAssetDataAsync(
return this.getMarketBuySwapQuoteForAssetDataAsync(
makerAssetData,
takerAssetData,
makerAssetBuyAmount,
options,
);
return swapQuote;
}
/**
@@ -339,13 +338,12 @@ export class SwapQuoter {
assert.isBigNumber('takerAssetSellAmount', takerAssetSellAmount);
const makerAssetData = assetDataUtils.encodeERC20AssetData(makerTokenAddress);
const takerAssetData = assetDataUtils.encodeERC20AssetData(takerTokenAddress);
const swapQuote = this.getMarketSellSwapQuoteForAssetDataAsync(
return this.getMarketSellSwapQuoteForAssetDataAsync(
makerAssetData,
takerAssetData,
takerAssetSellAmount,
options,
);
return swapQuote;
}
/**