diff options
author | Fabio Berger <me@fabioberger.com> | 2017-06-01 02:08:28 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-06-01 02:08:28 +0800 |
commit | 595656d3fc06a221274eb6bee89e7ba6e4e8ae61 (patch) | |
tree | 7fe822899556285ab9ea6dbde055aa4a927373ee /src/0x.js.ts | |
parent | 9364c5647ff5518aaa2b3fcd133a9e6c47ec0eda (diff) | |
download | dexon-sol-tools-595656d3fc06a221274eb6bee89e7ba6e4e8ae61.tar dexon-sol-tools-595656d3fc06a221274eb6bee89e7ba6e4e8ae61.tar.gz dexon-sol-tools-595656d3fc06a221274eb6bee89e7ba6e4e8ae61.tar.bz2 dexon-sol-tools-595656d3fc06a221274eb6bee89e7ba6e4e8ae61.tar.lz dexon-sol-tools-595656d3fc06a221274eb6bee89e7ba6e4e8ae61.tar.xz dexon-sol-tools-595656d3fc06a221274eb6bee89e7ba6e4e8ae61.tar.zst dexon-sol-tools-595656d3fc06a221274eb6bee89e7ba6e4e8ae61.zip |
Move isValidOrderHash to utils and implement assert.isValidOrderHash
Diffstat (limited to 'src/0x.js.ts')
-rw-r--r-- | src/0x.js.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/0x.js.ts b/src/0x.js.ts index d231c579e..ac00d3b42 100644 --- a/src/0x.js.ts +++ b/src/0x.js.ts @@ -102,10 +102,10 @@ export class ZeroEx { return salt; } /** Checks if order hash is valid */ - public static isValidOrderHash(orderHash: string): boolean { - assert.isString('orderHash', orderHash); - const isValid = /^0x[0-9A-F]{64}$/i.test(orderHash); - return isValid; + public static isValidOrderHash(orderHashHex: string): boolean { + assert.isString('orderHashHex', orderHashHex); + const isValidOrderHash = utils.isValidOrderHash(orderHashHex); + return isValidOrderHash; } /** * A unit amount is defined as the amount of a token above the specified decimal places (integer part). |