aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 16:24:45 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 16:24:45 +0800
commitcda040ef997761a1dcfa482dbd2f90fe546b3743 (patch)
treec46b7e20875a9af804cf8303cf856ac1e321241b
parent9bb738bb2f2b26b61049315ca26a96511460062e (diff)
parent1f6ed77f4700229fe5d667cd352e74a0c4e4c3c4 (diff)
downloaddexon-0x-contracts-cda040ef997761a1dcfa482dbd2f90fe546b3743.tar.gz
dexon-0x-contracts-cda040ef997761a1dcfa482dbd2f90fe546b3743.tar.zst
dexon-0x-contracts-cda040ef997761a1dcfa482dbd2f90fe546b3743.zip
Merge branch 'master' into fillOrderAsync
-rw-r--r--package.json3
-rw-r--r--src/web3_wrapper.ts2
-rw-r--r--test/exchange_wrapper.ts (renamed from test/contract_wrapper_test.ts)0
3 files changed, 3 insertions, 2 deletions
diff --git a/package.json b/package.json
index 4c196f3bb..59e33a7dd 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,8 @@
"build:commonjs:dev": "tsc; copyfiles -u 2 ./src/artifacts/*.json ../0x.js/lib/src/artifacts;",
"test:commonjs": "run-s build:commonjs:dev run_mocha",
"pretest:umd": "run-s clean build:*:dev",
- "substitute_umd_bundle": "shx rm -rf lib/src && shx mv _bundles lib/src",
+ "substitute_umd_bundle": "npm run remove_src_files_not_used_by_tests; shx mv _bundles/* lib/src",
+ "remove_src_files_not_used_by_tests": "find ./lib/src \\( -path ./lib/src/utils -o -path ./lib/src/schemas -o -path \"./lib/src/types.*\" \\) -prune -o -type f -print | xargs rm",
"run_mocha": "mocha lib/test/**/*_test.js"
},
"config": {
diff --git a/src/web3_wrapper.ts b/src/web3_wrapper.ts
index 72daabe6f..1ed1c0b29 100644
--- a/src/web3_wrapper.ts
+++ b/src/web3_wrapper.ts
@@ -57,7 +57,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;
}
diff --git a/test/contract_wrapper_test.ts b/test/exchange_wrapper.ts
index 4bfc49374..4bfc49374 100644
--- a/test/contract_wrapper_test.ts
+++ b/test/exchange_wrapper.ts