aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/exchange_wrapper_test.ts18
-rw-r--r--test/utils/order_factory.ts2
2 files changed, 10 insertions, 10 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 6c81bcb49..cf828bd8d 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -394,11 +394,11 @@ describe('ExchangeWrapper', () => {
signedOrder = await fillScenarios.createFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
);
- signedOrderHashHex = await zeroEx.getOrderHashHexAsync(signedOrder);
+ signedOrderHashHex = zeroEx.getOrderHashHex(signedOrder);
anotherSignedOrder = await fillScenarios.createFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
);
- anotherOrderHashHex = await zeroEx.getOrderHashHexAsync(anotherSignedOrder);
+ anotherOrderHashHex = zeroEx.getOrderHashHex(anotherSignedOrder);
orderFillBatch = [
{
signedOrder,
@@ -438,11 +438,11 @@ describe('ExchangeWrapper', () => {
signedOrder = await fillScenarios.createFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
);
- signedOrderHashHex = await zeroEx.getOrderHashHexAsync(signedOrder);
+ signedOrderHashHex = zeroEx.getOrderHashHex(signedOrder);
anotherSignedOrder = await fillScenarios.createFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
);
- anotherOrderHashHex = await zeroEx.getOrderHashHexAsync(anotherSignedOrder);
+ anotherOrderHashHex = zeroEx.getOrderHashHex(anotherSignedOrder);
signedOrders = [signedOrder, anotherSignedOrder];
});
describe('successful batch fills', () => {
@@ -490,7 +490,7 @@ describe('ExchangeWrapper', () => {
signedOrder = await fillScenarios.createFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
);
- orderHashHex = await zeroEx.getOrderHashHexAsync(signedOrder);
+ orderHashHex = zeroEx.getOrderHashHex(signedOrder);
});
describe('#cancelOrderAsync', () => {
describe('failed cancels', () => {
@@ -505,7 +505,7 @@ describe('ExchangeWrapper', () => {
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress,
fillableAmount, expirationInPast,
);
- orderHashHex = await zeroEx.getOrderHashHexAsync(expiredSignedOrder);
+ orderHashHex = zeroEx.getOrderHashHex(expiredSignedOrder);
return expect(zeroEx.exchange.cancelOrderAsync(expiredSignedOrder, cancelAmount))
.to.be.rejectedWith(ExchangeContractErrs.ORDER_CANCEL_EXPIRED);
});
@@ -537,7 +537,7 @@ describe('ExchangeWrapper', () => {
anotherSignedOrder = await fillScenarios.createFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
);
- anotherOrderHashHex = await zeroEx.getOrderHashHexAsync(anotherSignedOrder);
+ anotherOrderHashHex = zeroEx.getOrderHashHex(anotherSignedOrder);
cancelBatch = [
{
order: signedOrder,
@@ -598,7 +598,7 @@ describe('ExchangeWrapper', () => {
signedOrder = await fillScenarios.createPartiallyFilledSignedOrderAsync(
makerTokenAddress, takerTokenAddress, takerAddress, fillableAmount, partialFillAmount,
);
- orderHash = await zeroEx.getOrderHashHexAsync(signedOrder);
+ orderHash = zeroEx.getOrderHashHex(signedOrder);
});
describe('#getUnavailableTakerAmountAsync', () => {
it ('should throw if passed an invalid orderHash', async () => {
@@ -805,7 +805,7 @@ describe('ExchangeWrapper', () => {
const signedOrder = await fillScenarios.createFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
);
- const orderHash = await zeroEx.getOrderHashHexAsync(signedOrder);
+ const orderHash = zeroEx.getOrderHashHex(signedOrder);
const orderHashFromContract = await (zeroEx.exchange as any)
._getOrderHashHexUsingContractCallAsync(signedOrder);
expect(orderHash).to.equal(orderHashFromContract);
diff --git a/test/utils/order_factory.ts b/test/utils/order_factory.ts
index 0ac430dfe..22bf44c0f 100644
--- a/test/utils/order_factory.ts
+++ b/test/utils/order_factory.ts
@@ -34,7 +34,7 @@ export const orderFactory = {
feeRecipient,
expirationUnixTimestampSec,
};
- const orderHash = await zeroEx.getOrderHashHexAsync(order);
+ const orderHash = zeroEx.getOrderHashHex(order);
const ecSignature = await zeroEx.signOrderHashAsync(orderHash, maker);
const signedOrder: SignedOrder = _.assign(order, {ecSignature});
return signedOrder;