aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts/0x.js.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-05-25 18:28:28 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-05-25 18:28:28 +0800
commit00a16b37e0bd3a394285cd887e8678fb7eb19149 (patch)
treeb16ec3599e6451e8150759f0cd68ce02d707edb5 /src/ts/0x.js.ts
parent5be5debdf1122d7f9767fa7e5cd23a23d91bf93c (diff)
downloaddexon-sol-tools-00a16b37e0bd3a394285cd887e8678fb7eb19149.tar
dexon-sol-tools-00a16b37e0bd3a394285cd887e8678fb7eb19149.tar.gz
dexon-sol-tools-00a16b37e0bd3a394285cd887e8678fb7eb19149.tar.bz2
dexon-sol-tools-00a16b37e0bd3a394285cd887e8678fb7eb19149.tar.lz
dexon-sol-tools-00a16b37e0bd3a394285cd887e8678fb7eb19149.tar.xz
dexon-sol-tools-00a16b37e0bd3a394285cd887e8678fb7eb19149.tar.zst
dexon-sol-tools-00a16b37e0bd3a394285cd887e8678fb7eb19149.zip
Remove HexString type
Diffstat (limited to 'src/ts/0x.js.ts')
-rw-r--r--src/ts/0x.js.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ts/0x.js.ts b/src/ts/0x.js.ts
index 1f9ea5f9b..89d049bec 100644
--- a/src/ts/0x.js.ts
+++ b/src/ts/0x.js.ts
@@ -19,12 +19,12 @@ export class ZeroEx {
* Verifies that the elliptic curve signature `signature` was generated
* by signing `data` with the private key corresponding to the `signer` address.
*/
- public static isValidSignature(data: HexString, signature: ECSignature, signer: ETHAddressHex): boolean {
- assert.isString('data', data);
+ public static isValidSignature(dataHex: string, signature: ECSignature, signer: ETHAddressHex): boolean {
+ assert.isHexString('dataHex', dataHex);
assert.isObject('signature', signature);
assert.isETHAddressHex('signer', signer);
- const dataBuff = ethUtil.toBuffer(data);
+ const dataBuff = ethUtil.toBuffer(dataHex);
const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff);
try {
const pubKey = ethUtil.ecrecover(msgHashBuff,
@@ -51,7 +51,7 @@ export class ZeroEx {
return salt;
}
/** Checks if order hash is valid */
- public static isValidOrderHash(orderHash: HexString): boolean {
+ public static isValidOrderHash(orderHash: string): boolean {
assert.isHexString('orderHash', orderHash);
return orderHash.length === ORDER_HASH_LENGTH;
}