diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-15 11:31:42 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-11-15 11:31:42 +0800 |
commit | 031b07264aa284c4e3cf1a9d464ec3df4b652977 (patch) | |
tree | 18d83296e581db5bccba90333a796acf640bc18d | |
parent | 87f8e93e1284dd446d789320b651600b5c2a330f (diff) | |
parent | 5b5c31861a9861a9863e0cf9a14eee3d34a0e425 (diff) | |
download | dexon-sol-tools-031b07264aa284c4e3cf1a9d464ec3df4b652977.tar.gz dexon-sol-tools-031b07264aa284c4e3cf1a9d464ec3df4b652977.tar.zst dexon-sol-tools-031b07264aa284c4e3cf1a9d464ec3df4b652977.zip |
Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
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'); }, -}); +}; |