remove _noTakerFee (i.e. disallow StaticCall takerFeeAssetData)

This commit is contained in:
Michael Zhu
2020-01-05 22:38:16 -05:00
committed by Amir
parent 295811ed5a
commit b70cb726c5
5 changed files with 6 additions and 70 deletions

View File

@@ -319,7 +319,7 @@ blockchainTests('Forwarder integration tests', env => {
const fillableOrder = await maker.signOrderAsync();
await testFactory.marketSellTestAsync([cancelledOrder, fillableOrder], 1.5, { noopOrders: [0] });
});
for (const orderAssetData of ['makerAssetData', 'makerFeeAssetData', 'takerFeeAssetData']) {
for (const orderAssetData of ['makerAssetData', 'makerFeeAssetData']) {
it(`should fill an order with StaticCall ${orderAssetData} if the StaticCall succeeds`, async () => {
const staticCallOrder = await maker.signOrderAsync({
[orderAssetData]: staticCallSuccessAssetData,

View File

@@ -246,10 +246,7 @@ export class ForwarderTestFactory {
const makerFeeFilled = takerAssetFilled.times(order.makerFee).dividedToIntegerBy(order.takerAssetAmount);
makerFee = BigNumber.max(makerFee.minus(makerFeeFilled), 0);
const takerFeeFilled = takerAssetFilled.times(order.takerFee).dividedToIntegerBy(order.takerAssetAmount);
takerFee =
hexUtils.slice(order.takerFeeAssetData, 0, 4) === AssetProxyId.StaticCall
? constants.ZERO_AMOUNT
: BigNumber.max(takerFee.minus(takerFeeFilled), 0);
takerFee = BigNumber.max(takerFee.minus(takerFeeFilled), 0);
makerAssetAmount = makerAssetAmount.plus(bridgeExcessBuyAmount);
let wethSpentAmount = takerAssetAmount.plus(DeploymentManager.protocolFee);