diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-07-31 08:43:02 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-07-31 15:11:28 +0800 |
commit | 045751a430c512d94bf7e515d7531bac68dc2179 (patch) | |
tree | 6cde58036f3c7090784b38b8ced3341905bf5c71 /packages/contract-wrappers/test | |
parent | a7238d0fdb302d7062f3f63c3119910286f992c5 (diff) | |
download | dexon-sol-tools-045751a430c512d94bf7e515d7531bac68dc2179.tar dexon-sol-tools-045751a430c512d94bf7e515d7531bac68dc2179.tar.gz dexon-sol-tools-045751a430c512d94bf7e515d7531bac68dc2179.tar.bz2 dexon-sol-tools-045751a430c512d94bf7e515d7531bac68dc2179.tar.lz dexon-sol-tools-045751a430c512d94bf7e515d7531bac68dc2179.tar.xz dexon-sol-tools-045751a430c512d94bf7e515d7531bac68dc2179.tar.zst dexon-sol-tools-045751a430c512d94bf7e515d7531bac68dc2179.zip |
Add getOrdersInfo to exchange_wrapper
Diffstat (limited to 'packages/contract-wrappers/test')
-rw-r--r-- | packages/contract-wrappers/test/exchange_wrapper_test.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts index dca212f65..e468187f2 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); |