fix LP and MB sources leaking into getSell/BuyOperations() when they should be disabled

This commit is contained in:
Lawrence Forman
2020-09-23 21:58:45 -04:00
parent d7de191947
commit ac6b03cd4a
5 changed files with 40 additions and 22 deletions

View File

@@ -22,7 +22,7 @@ describe('quote_simulation tests', async () => {
const TAKER_TOKEN = randomAddress();
const DEFAULT_MAKER_ASSET_DATA = assetDataUtils.encodeERC20AssetData(MAKER_TOKEN);
const DEFAULT_TAKER_ASSET_DATA = assetDataUtils.encodeERC20AssetData(TAKER_TOKEN);
const GAS_SCHEDULE = { [ERC20BridgeSource.Native]: _.constant(1) };
const GAS_SCHEDULE = { [ERC20BridgeSource.Uniswap]: _.constant(1) };
// Check if two numbers are within `maxError` error rate within each other.
function assertRoughlyEquals(n1: BigNumber, n2: BigNumber, maxError: BigNumber | number = 1e-10): void {
@@ -164,7 +164,7 @@ describe('quote_simulation tests', async () => {
const subFillOutputs = subdivideAmount(outputs[i], count);
return {
sourcePathId: nativeSourcePathId,
source: ERC20BridgeSource.Native,
source: ERC20BridgeSource.Uniswap,
input: inputs[i],
output: outputs[i],
subFills: _.times(count, j => ({