aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test/exchange_wrapper_test.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-08-02 06:26:45 +0800
committerGitHub <noreply@github.com>2018-08-02 06:26:45 +0800
commit2414b47a301238c8c78e859321590fcb42371817 (patch)
treef26d6ee0f406dddf1df671b2a46a255fa8b78982 /packages/contract-wrappers/test/exchange_wrapper_test.ts
parent6f0daa54633d4c30096df7c552ceddc3e65fd47d (diff)
parentca1f926d6d137f9523a9765c047430ec39d45d86 (diff)
downloaddexon-0x-contracts-2414b47a301238c8c78e859321590fcb42371817.tar.gz
dexon-0x-contracts-2414b47a301238c8c78e859321590fcb42371817.tar.zst
dexon-0x-contracts-2414b47a301238c8c78e859321590fcb42371817.zip
Merge pull request #934 from 0xProject/feature/contract-wrappers/forwader
Initial forwarder contract wrapper
Diffstat (limited to 'packages/contract-wrappers/test/exchange_wrapper_test.ts')
-rw-r--r--packages/contract-wrappers/test/exchange_wrapper_test.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts
index dca212f65..fa3b49eb9 100644
--- a/packages/contract-wrappers/test/exchange_wrapper_test.ts
+++ b/packages/contract-wrappers/test/exchange_wrapper_test.ts
@@ -277,6 +277,15 @@ describe('ExchangeWrapper', () => {
expect(orderInfo.orderHash).to.be.equal(orderHash);
});
});
+ describe('#getOrdersInfoAsync', () => {
+ it('should get the orders info', async () => {
+ const ordersInfo = await contractWrappers.exchange.getOrdersInfoAsync([signedOrder, anotherSignedOrder]);
+ const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
+ expect(ordersInfo[0].orderHash).to.be.equal(orderHash);
+ const anotherOrderHash = orderHashUtils.getOrderHashHex(anotherSignedOrder);
+ expect(ordersInfo[1].orderHash).to.be.equal(anotherOrderHash);
+ });
+ });
describe('#isValidSignature', () => {
it('should check if the signature is valid', async () => {
const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
@@ -295,7 +304,7 @@ describe('ExchangeWrapper', () => {
});
});
describe('#isAllowedValidatorAsync', () => {
- it('should check if the validator is alllowed', async () => {
+ it('should check if the validator is allowed', async () => {
const signerAddress = makerAddress;
const validatorAddress = constants.NULL_ADDRESS;
const isAllowed = await contractWrappers.exchange.isAllowedValidatorAsync(signerAddress, validatorAddress);