aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/exchange
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/test/exchange')
-rw-r--r--packages/contracts/test/exchange/core.ts34
1 files changed, 21 insertions, 13 deletions
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts
index 4dfe3df5d..f3ab94139 100644
--- a/packages/contracts/test/exchange/core.ts
+++ b/packages/contracts/test/exchange/core.ts
@@ -679,22 +679,22 @@ describe('Exchange', () => {
});
});
- describe('cancelOrdersUpTo', () => {
+ describe('cancelOrdersUpTo', () => {
it('should fail to set makerEpoch less than current makerEpoch', async () => {
const makerEpoch = new BigNumber(1);
await exWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress);
const lesserMakerEpoch = new BigNumber(0);
- return expect(
- exWrapper.cancelOrdersUpToAsync(lesserMakerEpoch, makerAddress),
- ).to.be.rejectedWith(constants.REVERT);
+ return expect(exWrapper.cancelOrdersUpToAsync(lesserMakerEpoch, makerAddress)).to.be.rejectedWith(
+ constants.REVERT,
+ );
});
it('should fail to set makerEpoch equal to existing makerEpoch', async () => {
const makerEpoch = new BigNumber(1);
await exWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress);
- return expect(
- exWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress),
- ).to.be.rejectedWith(constants.REVERT);
+ return expect(exWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress)).to.be.rejectedWith(
+ constants.REVERT,
+ );
});
it('should cancel only orders with a makerEpoch less than existing makerEpoch', async () => {
@@ -709,19 +709,23 @@ describe('Exchange', () => {
orderFactory.newSignedOrder({
makerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(9), 18),
takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(9), 18),
- salt: new BigNumber(0)}),
+ salt: new BigNumber(0),
+ }),
orderFactory.newSignedOrder({
makerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(79), 18),
takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(79), 18),
- salt: new BigNumber(1)}),
+ salt: new BigNumber(1),
+ }),
orderFactory.newSignedOrder({
makerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(979), 18),
takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(979), 18),
- salt: new BigNumber(2)}),
+ salt: new BigNumber(2),
+ }),
orderFactory.newSignedOrder({
makerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(7979), 18),
takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(7979), 18),
- salt: new BigNumber(3)}),
+ salt: new BigNumber(3),
+ }),
]);
await exWrapper.batchFillOrdersNoThrowAsync(signedOrders, takerAddress);
@@ -736,14 +740,18 @@ describe('Exchange', () => {
expect(newBalances[makerAddress][signedOrders[3].takerTokenAddress]).to.be.bignumber.equal(
balances[makerAddress][signedOrders[3].takerTokenAddress].add(fillTakerTokenAmount),
);
- expect(newBalances[makerAddress][zrx.address]).to.be.bignumber.equal(balances[makerAddress][zrx.address].minus(makerFeeAmount));
+ expect(newBalances[makerAddress][zrx.address]).to.be.bignumber.equal(
+ balances[makerAddress][zrx.address].minus(makerFeeAmount),
+ );
expect(newBalances[takerAddress][signedOrders[3].takerTokenAddress]).to.be.bignumber.equal(
balances[takerAddress][signedOrders[3].takerTokenAddress].minus(fillTakerTokenAmount),
);
expect(newBalances[takerAddress][signedOrders[3].makerTokenAddress]).to.be.bignumber.equal(
balances[takerAddress][signedOrders[3].makerTokenAddress].add(fillMakerTokenAmount),
);
- expect(newBalances[takerAddress][zrx.address]).to.be.bignumber.equal(balances[takerAddress][zrx.address].minus(takerFeeAmount));
+ expect(newBalances[takerAddress][zrx.address]).to.be.bignumber.equal(
+ balances[takerAddress][zrx.address].minus(takerFeeAmount),
+ );
expect(newBalances[feeRecipientAddress][zrx.address]).to.be.bignumber.equal(
balances[feeRecipientAddress][zrx.address].add(makerFeeAmount.add(takerFeeAmount)),
);