might as well change ethValueAdjustment to number too

This commit is contained in:
Michael Zhu
2019-08-20 16:39:10 -07:00
parent 9e46099ced
commit 8dd8cf8673
2 changed files with 5 additions and 5 deletions

View File

@@ -445,7 +445,7 @@ describe(ContractName.Forwarder, () => {
takerAssetAmount: Web3Wrapper.toBaseUnitAmount(17, DECIMALS_DEFAULT),
});
await forwarderTestFactory.marketBuyTestAsync([order], 0.57, erc20Token, {
ethValueAdjustment: new BigNumber(2),
ethValueAdjustment: 2,
});
});
it('should buy the exact amount of makerAsset from a single order with a WETH fee', async () => {
@@ -474,7 +474,7 @@ describe(ContractName.Forwarder, () => {
);
await forwarderTestFactory.marketBuyTestAsync([order], 0.5, erc20Token, {
ethValueAdjustment: new BigNumber(-2),
ethValueAdjustment: -2,
revertError,
});
});
@@ -725,7 +725,7 @@ describe(ContractName.Forwarder, () => {
// -2 to compensate for the extra 1 wei added in ForwarderTestFactory to account for rounding
await forwarderTestFactory.marketBuyTestAsync([order], 0.5, erc20Token, {
ethValueAdjustment: new BigNumber(-2),
ethValueAdjustment: -2,
forwarderFeePercentage,
revertError,
});

View File

@@ -149,13 +149,13 @@ export class ForwarderTestFactory {
fractionalNumberOfOrdersToFill: number,
makerAssetContract: DummyERC20TokenContract | DummyERC721TokenContract,
options: {
ethValueAdjustment?: BigNumber; // Used to provided insufficient/excess ETH
ethValueAdjustment?: number; // Used to provided insufficient/excess ETH
forwarderFeePercentage?: BigNumber;
makerAssetId?: BigNumber;
revertError?: RevertError;
} = {},
): Promise<void> {
const ethValueAdjustment = options.ethValueAdjustment || constants.ZERO_AMOUNT;
const ethValueAdjustment = options.ethValueAdjustment || 0;
const forwarderFeePercentage = options.forwarderFeePercentage || constants.ZERO_AMOUNT;
const erc20Balances = await this._erc20Wrapper.getBalancesAsync();