Merge branch 'tokenRegistry' into erc20Wrapper

This commit is contained in:
Fabio Berger 2017-05-30 09:55:52 +02:00
commit f4bc7ecf5f
2 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ export class Web3Wrapper {
public async doesContractExistAtAddressAsync(address: string): Promise<boolean> {
const code = await promisify(this.web3.eth.getCode)(address);
// Regex matches 0x0, 0x00, 0x in order to accomodate poorly implemented clients
const zeroHexAddressRegex = /^0x0\{0,40\}$/i;
const zeroHexAddressRegex = /^0x0*$/i;
const didFindCode = _.isNull(code.match(zeroHexAddressRegex));
return didFindCode;
}