diff options
author | Fabio Berger <me@fabioberger.com> | 2018-02-28 01:58:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-28 01:58:09 +0800 |
commit | fce10548d2d992317e36af48638a5ee799e94e7c (patch) | |
tree | 51b9a6a2f0dbaee50a9758a7983fe201d5898354 /packages/assert | |
parent | 709fa9e02ec21cee9fc145b4a578742c8dd190aa (diff) | |
parent | 6961169f89c4cd8480aca9c720cd8299aec9bbc0 (diff) | |
download | dexon-sol-tools-fce10548d2d992317e36af48638a5ee799e94e7c.tar dexon-sol-tools-fce10548d2d992317e36af48638a5ee799e94e7c.tar.gz dexon-sol-tools-fce10548d2d992317e36af48638a5ee799e94e7c.tar.bz2 dexon-sol-tools-fce10548d2d992317e36af48638a5ee799e94e7c.tar.lz dexon-sol-tools-fce10548d2d992317e36af48638a5ee799e94e7c.tar.xz dexon-sol-tools-fce10548d2d992317e36af48638a5ee799e94e7c.tar.zst dexon-sol-tools-fce10548d2d992317e36af48638a5ee799e94e7c.zip |
Merge pull request #373 from 0xProject/feature/0x.js/lowercase-addresses
Lowercase addresses in the Public API
Diffstat (limited to 'packages/assert')
-rw-r--r-- | packages/assert/CHANGELOG.md | 1 | ||||
-rw-r--r-- | packages/assert/src/index.ts | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md index f512f7b10..6721c4cb6 100644 --- a/packages/assert/CHANGELOG.md +++ b/packages/assert/CHANGELOG.md @@ -2,6 +2,7 @@ ## v0.1.0 - _TBD, 2018_ + * Remove isETHAddressHex checksum address check and assume address will be lowercased (#373) * Add an optional parameter `subSchemas` to `doesConformToSchema` method (#385) ## v0.0.18 - _February 9, 2017_ diff --git a/packages/assert/src/index.ts b/packages/assert/src/index.ts index 4d090e493..40d083cb6 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, |