Remove lingering invalid calls to OrderStateUtils()

This commit is contained in:
Lawrence Forman
2019-03-25 23:02:55 -04:00
committed by Amir Bandeali
parent c096eae644
commit bd06c7b343
2 changed files with 5 additions and 8 deletions

View File

@@ -14,8 +14,6 @@ chaiSetup.configure();
const expect = chai.expect;
describe('OrderStateUtils', () => {
const CHAIN_ID = 1337;
describe('#getOpenOrderStateAsync', () => {
const buildMockBalanceFetcher = (takerBalance: BigNumber): AbstractBalanceAndProxyAllowanceFetcher => {
const balanceFetcher = {
@@ -60,7 +58,7 @@ describe('OrderStateUtils', () => {
1,
);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher, CHAIN_ID);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder);
expect(orderState.isValid).to.eq(true);
});
@@ -79,7 +77,7 @@ describe('OrderStateUtils', () => {
1,
);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher, CHAIN_ID);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder);
expect(orderState.isValid).to.eq(false);
});
@@ -99,7 +97,7 @@ describe('OrderStateUtils', () => {
1,
);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher, CHAIN_ID);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder);
expect(orderState.isValid).to.eq(false);
});
@@ -119,7 +117,7 @@ describe('OrderStateUtils', () => {
1,
);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher, CHAIN_ID);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder);
expect(orderState.isValid).to.eq(false);
});
@@ -138,7 +136,7 @@ describe('OrderStateUtils', () => {
1,
);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher, CHAIN_ID);
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
const transactionHash = '0xdeadbeef';
const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder, transactionHash);
expect(orderState.transactionHash).to.eq(transactionHash);