diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/assert.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts index d93ac71f7..2ee87e549 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'); }, + hashAtMostOneUniqueValue(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)); }, |