diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2017-11-15 11:23:41 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2017-11-15 11:23:41 +0800 |
commit | 5b5c31861a9861a9863e0cf9a14eee3d34a0e425 (patch) | |
tree | d3f6043a41aee5d4847f46022e16cbf139f21b66 | |
parent | 5bd8e172c9415e9d8eca2d3893fe767684018351 (diff) | |
download | dexon-sol-tools-5b5c31861a9861a9863e0cf9a14eee3d34a0e425.tar dexon-sol-tools-5b5c31861a9861a9863e0cf9a14eee3d34a0e425.tar.gz dexon-sol-tools-5b5c31861a9861a9863e0cf9a14eee3d34a0e425.tar.bz2 dexon-sol-tools-5b5c31861a9861a9863e0cf9a14eee3d34a0e425.tar.lz dexon-sol-tools-5b5c31861a9861a9863e0cf9a14eee3d34a0e425.tar.xz dexon-sol-tools-5b5c31861a9861a9863e0cf9a14eee3d34a0e425.tar.zst dexon-sol-tools-5b5c31861a9861a9863e0cf9a14eee3d34a0e425.zip |
Change the way 0x.js assert extends the @0xproject/assert module
-rw-r--r-- | packages/0x.js/src/utils/assert.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/0x.js/src/utils/assert.ts b/packages/0x.js/src/utils/assert.ts index 63d975c03..55912525c 100644 --- a/packages/0x.js/src/utils/assert.ts +++ b/packages/0x.js/src/utils/assert.ts @@ -9,7 +9,8 @@ import {ECSignature} from '../types'; const HEX_REGEX = /^0x[0-9A-F]*$/i; -export const assert = _.extend({}, sharedAssert, { +export const assert = { + ...sharedAssert, isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string) { const isValidSignature = signatureUtils.isValidSignature(orderHash, ecSignature, signerAddress); this.assert(isValidSignature, `Expected order with hash '${orderHash}' to have a valid signature`); @@ -26,4 +27,4 @@ export const assert = _.extend({}, sharedAssert, { const availableAddresses = await web3Wrapper.getAvailableAddressesAsync(); this.assert(!_.isEmpty(availableAddresses), 'No addresses were available on the provided web3 provider'); }, -}); +}; |