From 595656d3fc06a221274eb6bee89e7ba6e4e8ae61 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 31 May 2017 20:08:28 +0200 Subject: Move isValidOrderHash to utils and implement assert.isValidOrderHash --- src/utils/utils.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils/utils.ts') diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 336eaf7bb..e6840a624 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -18,4 +18,8 @@ export const utils = { isParityNode(nodeVersion: string): boolean { return _.includes(nodeVersion, 'Parity'); }, + isValidOrderHash(orderHashHex: string) { + const isValid = /^0x[0-9A-F]{64}$/i.test(orderHashHex); + return isValid; + }, }; -- cgit v1.2.3