diff options
Diffstat (limited to 'packages/contracts/test/ts/exchange/core.ts')
-rw-r--r-- | packages/contracts/test/ts/exchange/core.ts | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/packages/contracts/test/ts/exchange/core.ts b/packages/contracts/test/ts/exchange/core.ts index daf46ca37..e4aa74c32 100644 --- a/packages/contracts/test/ts/exchange/core.ts +++ b/packages/contracts/test/ts/exchange/core.ts @@ -422,7 +422,7 @@ contract('Exchange', (accounts: string[]) => { takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(200), 18), }); - return expect(exWrapper.fillOrderAsync(order, taker)).to.be.rejectedWith(constants.INVALID_OPCODE); + return expect(exWrapper.fillOrderAsync(order, taker)).to.be.rejectedWith(constants.REVERT); }); it('should throw if signature is invalid', async () => { @@ -432,7 +432,7 @@ contract('Exchange', (accounts: string[]) => { order.params.r = ethUtil.bufferToHex(ethUtil.sha3('invalidR')); order.params.s = ethUtil.bufferToHex(ethUtil.sha3('invalidS')); - return expect(exWrapper.fillOrderAsync(order, taker)).to.be.rejectedWith(constants.INVALID_OPCODE); + return expect(exWrapper.fillOrderAsync(order, taker)).to.be.rejectedWith(constants.REVERT); }); it('should throw if makerTokenAmount is 0', async () => { @@ -440,7 +440,7 @@ contract('Exchange', (accounts: string[]) => { makerTokenAmount: new BigNumber(0), }); - return expect(exWrapper.fillOrderAsync(order, taker)).to.be.rejectedWith(constants.INVALID_OPCODE); + return expect(exWrapper.fillOrderAsync(order, taker)).to.be.rejectedWith(constants.REVERT); }); it('should throw if takerTokenAmount is 0', async () => { @@ -448,14 +448,14 @@ contract('Exchange', (accounts: string[]) => { takerTokenAmount: new BigNumber(0), }); - return expect(exWrapper.fillOrderAsync(order, taker)).to.be.rejectedWith(constants.INVALID_OPCODE); + return expect(exWrapper.fillOrderAsync(order, taker)).to.be.rejectedWith(constants.REVERT); }); it('should throw if fillTakerTokenAmount is 0', async () => { order = await orderFactory.newSignedOrderAsync(); return expect(exWrapper.fillOrderAsync(order, taker, {fillTakerTokenAmount: new BigNumber(0)})) - .to.be.rejectedWith(constants.INVALID_OPCODE); + .to.be.rejectedWith(constants.REVERT); }); it('should not change balances if maker balances are too low to fill order and \ @@ -478,7 +478,7 @@ contract('Exchange', (accounts: string[]) => { }); return expect(exWrapper.fillOrderAsync(order, taker, {shouldThrowOnInsufficientBalanceOrAllowance: true})) - .to.be.rejectedWith(constants.INVALID_OPCODE); + .to.be.rejectedWith(constants.REVERT); }); it('should not change balances if taker balances are too low to fill order and \ @@ -501,7 +501,7 @@ contract('Exchange', (accounts: string[]) => { }); return expect(exWrapper.fillOrderAsync(order, taker, {shouldThrowOnInsufficientBalanceOrAllowance: true})) - .to.be.rejectedWith(constants.INVALID_OPCODE); + .to.be.rejectedWith(constants.REVERT); }); it('should not change balances if maker allowances are too low to fill order and \ @@ -520,7 +520,7 @@ contract('Exchange', (accounts: string[]) => { async () => { await rep.approve(TokenTransferProxy.address, 0, {from: maker}); expect(exWrapper.fillOrderAsync(order, taker, {shouldThrowOnInsufficientBalanceOrAllowance: true})) - .to.be.rejectedWith(constants.INVALID_OPCODE); + .to.be.rejectedWith(constants.REVERT); await rep.approve(TokenTransferProxy.address, INITIAL_ALLOWANCE, {from: maker}); }); @@ -540,7 +540,7 @@ contract('Exchange', (accounts: string[]) => { async () => { await dgd.approve(TokenTransferProxy.address, 0, {from: taker}); expect(exWrapper.fillOrderAsync(order, taker, {shouldThrowOnInsufficientBalanceOrAllowance: true})) - .to.be.rejectedWith(constants.INVALID_OPCODE); + .to.be.rejectedWith(constants.REVERT); await dgd.approve(TokenTransferProxy.address, INITIAL_ALLOWANCE, {from: taker}); }); @@ -651,7 +651,7 @@ contract('Exchange', (accounts: string[]) => { }); it('should throw if not sent by maker', async () => { - return expect(exWrapper.cancelOrderAsync(order, taker)).to.be.rejectedWith(constants.INVALID_OPCODE); + return expect(exWrapper.cancelOrderAsync(order, taker)).to.be.rejectedWith(constants.REVERT); }); it('should throw if makerTokenAmount is 0', async () => { @@ -659,7 +659,7 @@ contract('Exchange', (accounts: string[]) => { makerTokenAmount: new BigNumber(0), }); - return expect(exWrapper.cancelOrderAsync(order, maker)).to.be.rejectedWith(constants.INVALID_OPCODE); + return expect(exWrapper.cancelOrderAsync(order, maker)).to.be.rejectedWith(constants.REVERT); }); it('should throw if takerTokenAmount is 0', async () => { @@ -667,14 +667,14 @@ contract('Exchange', (accounts: string[]) => { takerTokenAmount: new BigNumber(0), }); - return expect(exWrapper.cancelOrderAsync(order, maker)).to.be.rejectedWith(constants.INVALID_OPCODE); + return expect(exWrapper.cancelOrderAsync(order, maker)).to.be.rejectedWith(constants.REVERT); }); it('should throw if cancelTakerTokenAmount is 0', async () => { order = await orderFactory.newSignedOrderAsync(); return expect(exWrapper.cancelOrderAsync(order, maker, {cancelTakerTokenAmount: new BigNumber(0)})) - .to.be.rejectedWith(constants.INVALID_OPCODE); + .to.be.rejectedWith(constants.REVERT); }); it('should be able to cancel a full order', async () => { |