Address PR feedback

This commit is contained in:
Amir Bandeali
2019-12-08 16:28:00 -08:00
parent e2e4d048ab
commit 4b842b81a0
6 changed files with 16 additions and 21 deletions

View File

@@ -655,13 +655,12 @@ blockchainTests('Forwarder integration tests', env => {
forwarderFeeAmounts[0],
value,
);
return expect(
forwarder
.marketBuyOrdersWithEth([order], order.makerAssetAmount, [order.signature], forwarderFeeAmounts, [
randomAddress(),
])
.awaitTransactionSuccessAsync({ value }),
).to.revertWith(revertError);
await testFactory.marketBuyTestAsync([order], 0, {
revertError,
ethValueAdjustment: -1,
forwarderFeeAmounts,
forwarderFeeRecipientAddresses: [randomAddress()],
});
});
});
});

View File

@@ -1,6 +1,6 @@
import { IAssetDataContract } from '@0x/contracts-asset-proxy';
import { ForwarderContract } from '@0x/contracts-exchange-forwarder';
import { constants, expect, hexSlice, OrderStatus, provider } from '@0x/contracts-test-utils';
import { constants, expect, OrderStatus, provider } from '@0x/contracts-test-utils';
import { AssetProxyId, OrderInfo, SignedOrder } from '@0x/types';
import { BigNumber, hexUtils, RevertError } from '@0x/utils';
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
@@ -91,9 +91,7 @@ export class ForwarderTestFactory {
forwarderFeeRecipientAddresses,
)
.awaitTransactionSuccessAsync({
value: wethSpentAmount
.plus(forwarderFeeAmounts.reduce((prev, curr) => prev.plus(curr), constants.ZERO_AMOUNT))
.plus(ethValueAdjustment),
value: wethSpentAmount.plus(BigNumber.sum(0, ...forwarderFeeAmounts)).plus(ethValueAdjustment),
from: this._taker.address,
});
@@ -137,9 +135,7 @@ export class ForwarderTestFactory {
forwarderFeeRecipientAddresses,
)
.awaitTransactionSuccessAsync({
value: wethSpentAmount.plus(
forwarderFeeAmounts.reduce((prev, curr) => prev.plus(curr), constants.ZERO_AMOUNT),
),
value: wethSpentAmount.plus(BigNumber.sum(0, ...forwarderFeeAmounts)),
from: this._taker.address,
});