diff options
author | Jacob Evans <jacob@dekz.net> | 2018-02-24 02:36:16 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-02-27 01:39:46 +0800 |
commit | eabe96fd194f21b1c670381506b115589a37eff5 (patch) | |
tree | 3998559ffc4f2dea03871068f73a25d90ffc66f8 /packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts | |
parent | f689d335c0c4042e7ecf3e4636db3434d0dcd7a8 (diff) | |
download | dexon-sol-tools-eabe96fd194f21b1c670381506b115589a37eff5.tar.gz dexon-sol-tools-eabe96fd194f21b1c670381506b115589a37eff5.tar.zst dexon-sol-tools-eabe96fd194f21b1c670381506b115589a37eff5.zip |
Check isETHAddressHex before lowercase
Flip the check so assertion happens before lowercase
Diffstat (limited to 'packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts')
-rw-r--r-- | packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts index 508ff15d7..f0ae5f33c 100644 --- a/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts @@ -57,8 +57,8 @@ export class TokenRegistryWrapper extends ContractWrapper { * @return An object that conforms to the Token interface or undefined if token not found. */ public async getTokenIfExistsAsync(address: string): Promise<Token | undefined> { + assert.isETHAddressHex('address', address); const normalizedAddress = address.toLowerCase(); - assert.isETHAddressHex('address', normalizedAddress); const tokenRegistryContract = await this._getTokenRegistryContractAsync(); const metadata = await tokenRegistryContract.getTokenMetaData.callAsync(normalizedAddress); |