aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-02 15:49:50 +0800
committerFabio Berger <me@fabioberger.com>2017-06-02 15:49:50 +0800
commit2cf5208f85bca11a507a5b0e2202f5f6eb531753 (patch)
treebb35b352ec61e61d930ab80e45c943057ba26f36 /src
parent707a5f55eb919b3460ae4ee7d58b9a0eaa56a07c (diff)
downloaddexon-sol-tools-2cf5208f85bca11a507a5b0e2202f5f6eb531753.tar.gz
dexon-sol-tools-2cf5208f85bca11a507a5b0e2202f5f6eb531753.tar.zst
dexon-sol-tools-2cf5208f85bca11a507a5b0e2202f5f6eb531753.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/0x.js.ts2
1 files changed, 2 insertions, 0 deletions
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;