aboutsummaryrefslogtreecommitdiffstats
path: root/test/exchange_wrapper_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-30 03:54:41 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-30 03:54:41 +0800
commitfa3963199eb875fdd6a70235cee263c39c317baa (patch)
tree872d6129e6d9c1781d68ad18ebf5d5d0c3b3a3f0 /test/exchange_wrapper_test.ts
parente1e79519b9430427dd6cbe2bfa9ced246ff14fbc (diff)
downloaddexon-sol-tools-fa3963199eb875fdd6a70235cee263c39c317baa.tar
dexon-sol-tools-fa3963199eb875fdd6a70235cee263c39c317baa.tar.gz
dexon-sol-tools-fa3963199eb875fdd6a70235cee263c39c317baa.tar.bz2
dexon-sol-tools-fa3963199eb875fdd6a70235cee263c39c317baa.tar.lz
dexon-sol-tools-fa3963199eb875fdd6a70235cee263c39c317baa.tar.xz
dexon-sol-tools-fa3963199eb875fdd6a70235cee263c39c317baa.tar.zst
dexon-sol-tools-fa3963199eb875fdd6a70235cee263c39c317baa.zip
Make zeroEx.getOrderHashHex non-async
Diffstat (limited to 'test/exchange_wrapper_test.ts')
-rw-r--r--test/exchange_wrapper_test.ts18
1 files changed, 9 insertions, 9 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);