From 6d462fc961da2ba4d5502ad6b71654c1715550d9 Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Mon, 21 May 2018 10:04:17 -0700 Subject: Remove TxOrigin signature type, modify whitelist to use Validator signature type --- packages/contracts/test/exchange/transactions.ts | 4 ++++ packages/contracts/test/libraries/lib_bytes.ts | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'packages/contracts/test') diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts index fe6df2f75..294e3aae9 100644 --- a/packages/contracts/test/exchange/transactions.ts +++ b/packages/contracts/test/exchange/transactions.ts @@ -218,6 +218,10 @@ describe('Exchange transactions', () => { txDefaults, exchange.address, ); + const isApproved = true; + await exchange.approveSignatureValidator.sendTransactionAsync(whitelist.address, isApproved, { + from: takerAddress, + }); const defaultOrderParams = { ...constants.STATIC_ORDER_PARAMS, senderAddress: whitelist.address, diff --git a/packages/contracts/test/libraries/lib_bytes.ts b/packages/contracts/test/libraries/lib_bytes.ts index ac654e037..c85cee5e3 100644 --- a/packages/contracts/test/libraries/lib_bytes.ts +++ b/packages/contracts/test/libraries/lib_bytes.ts @@ -62,12 +62,11 @@ describe('LibBytes', () => { describe('deepCopyBytes', () => { const byteArrayLongerThan32BytesLen = (byteArrayLongerThan32Bytes.length - 2) / 2; - it('should throw if length of copy is 0', async () => { + it('should return a byte array of length 0 if len is 0', async () => { const index = new BigNumber(0); const len = new BigNumber(0); - return expect( - libBytes.publicDeepCopyBytes.callAsync(byteArrayLongerThan32Bytes, index, len), - ).to.be.rejectedWith(constants.REVERT); + const copy = await libBytes.publicDeepCopyBytes.callAsync(byteArrayLongerThan32Bytes, index, len); + expect(copy).to.equal(constants.NULL_BYTES); }); it('should throw if start index + length to copy is greater than length of byte array', async () => { -- cgit v1.2.3