From 2cf5208f85bca11a507a5b0e2202f5f6eb531753 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 2 Jun 2017 09:49:50 +0200 Subject: Add comment about the isString assertion lest the next developer tries to use a stricter assertion (i.e isHexString) which we intentionally did not do --- src/0x.js.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/0x.js.ts b/src/0x.js.ts index b42d5dee1..666fd00c6 100644 --- a/src/0x.js.ts +++ b/src/0x.js.ts @@ -71,6 +71,8 @@ export class ZeroEx { } /** Checks if order hash is valid */ public static isValidOrderHash(orderHashHex: string): boolean { + // Since this method can be called to check if any arbitrary string conforms to an orderHash's + // format, we only assert that we were indeed passed a string. assert.isString('orderHashHex', orderHashHex); const isValidOrderHash = utils.isValidOrderHash(orderHashHex); return isValidOrderHash; -- cgit