aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-06-09 22:58:52 +0800
committerGitHub <noreply@github.com>2017-06-09 22:58:52 +0800
commit3a9d07c40ce2e26203962487036132d6357ec530 (patch)
tree87a2416fa3c0506ce0fffe2021de05069db4fbc2 /src/utils
parent389894088d2372e1eb9bf4d39bde2efe8ab38713 (diff)
parentba9a0b0bb9e87e69c818a5fe73183d8d22476948 (diff)
downloaddexon-sol-tools-3a9d07c40ce2e26203962487036132d6357ec530.tar
dexon-sol-tools-3a9d07c40ce2e26203962487036132d6357ec530.tar.gz
dexon-sol-tools-3a9d07c40ce2e26203962487036132d6357ec530.tar.bz2
dexon-sol-tools-3a9d07c40ce2e26203962487036132d6357ec530.tar.lz
dexon-sol-tools-3a9d07c40ce2e26203962487036132d6357ec530.tar.xz
dexon-sol-tools-3a9d07c40ce2e26203962487036132d6357ec530.tar.zst
dexon-sol-tools-3a9d07c40ce2e26203962487036132d6357ec530.zip
Merge pull request #49 from 0xProject/fillOrderUpToAsync
Implement fillOrderUpToAsync
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/assert.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts
index d93ac71f7..94b119d5a 100644
--- a/src/utils/assert.ts
+++ b/src/utils/assert.ts
@@ -38,6 +38,9 @@ export const assert = {
const availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
this.assert(!_.isEmpty(availableAddresses), 'No addresses were available on the provided web3 instance');
},
+ hasAtMostOneUniqueValue(value: any[], errMsg: string): void {
+ this.assert(_.uniq(value).length <= 1, errMsg);
+ },
isNumber(variableName: string, value: number): void {
this.assert(_.isFinite(value), this.typeAssertionMessage(variableName, 'number', value));
},