From eabe96fd194f21b1c670381506b115589a37eff5 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Fri, 23 Feb 2018 10:36:16 -0800 Subject: Check isETHAddressHex before lowercase Flip the check so assertion happens before lowercase --- packages/assert/src/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'packages/assert/src') diff --git a/packages/assert/src/index.ts b/packages/assert/src/index.ts index 7ad574ec7..a9d553487 100644 --- a/packages/assert/src/index.ts +++ b/packages/assert/src/index.ts @@ -33,11 +33,8 @@ export const assert = { ); }, isETHAddressHex(variableName: string, value: string): void { + this.assert(_.isString(value), this.typeAssertionMessage(variableName, 'string', value)); this.assert(addressUtils.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value)); - this.assert( - addressUtils.isAddress(value) && value.toLowerCase() === value, - `Checksummed addresses are not supported. Convert ${variableName} to lower case before passing`, - ); }, doesBelongToStringEnum( variableName: string, -- cgit v1.2.3