aboutsummaryrefslogtreecommitdiffstats
path: root/src/web3_wrapper.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-30 15:53:55 +0800
committerFabio Berger <me@fabioberger.com>2017-05-30 15:53:55 +0800
commit000e364406a8644bdcf9384405fb921b4cdbc4da (patch)
treedbbd9ff95e80fbf786d4ce9603fcfb766e82b21c /src/web3_wrapper.ts
parent7b9e8777f1915191aaf28a83a86b4a35d74dd930 (diff)
downloaddexon-sol-tools-000e364406a8644bdcf9384405fb921b4cdbc4da.tar
dexon-sol-tools-000e364406a8644bdcf9384405fb921b4cdbc4da.tar.gz
dexon-sol-tools-000e364406a8644bdcf9384405fb921b4cdbc4da.tar.bz2
dexon-sol-tools-000e364406a8644bdcf9384405fb921b4cdbc4da.tar.lz
dexon-sol-tools-000e364406a8644bdcf9384405fb921b4cdbc4da.tar.xz
dexon-sol-tools-000e364406a8644bdcf9384405fb921b4cdbc4da.tar.zst
dexon-sol-tools-000e364406a8644bdcf9384405fb921b4cdbc4da.zip
Reverts: 7e96b45ea0c51ca5589640018172a91a35596148 which broke this regex for the `0x0` edge-case
Diffstat (limited to 'src/web3_wrapper.ts')
-rw-r--r--src/web3_wrapper.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/web3_wrapper.ts b/src/web3_wrapper.ts
index 3b460e4da..97d04db8c 100644
--- a/src/web3_wrapper.ts
+++ b/src/web3_wrapper.ts
@@ -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;
}