aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-27 00:20:43 +0800
committerFabio Berger <me@fabioberger.com>2017-05-27 00:20:43 +0800
commit95f07a428b440d1e840b1020ed427ce51dd8a51c (patch)
tree35d7933ac471f85dccaee226e51b573238ab3230
parent90db58bb2adfd09ee672420f625f906e761d722e (diff)
parent2f5ffe6670a4672682937170ec5700b1a93a5ab6 (diff)
downloaddexon-sol-tools-95f07a428b440d1e840b1020ed427ce51dd8a51c.tar
dexon-sol-tools-95f07a428b440d1e840b1020ed427ce51dd8a51c.tar.gz
dexon-sol-tools-95f07a428b440d1e840b1020ed427ce51dd8a51c.tar.bz2
dexon-sol-tools-95f07a428b440d1e840b1020ed427ce51dd8a51c.tar.lz
dexon-sol-tools-95f07a428b440d1e840b1020ed427ce51dd8a51c.tar.xz
dexon-sol-tools-95f07a428b440d1e840b1020ed427ce51dd8a51c.tar.zst
dexon-sol-tools-95f07a428b440d1e840b1020ed427ce51dd8a51c.zip
Merge branch 'implementFirstExchangeMethod' of github.com:0xProject/0x.js into implementFirstExchangeMethod
-rw-r--r--package.json4
-rw-r--r--src/ts/web3_wrapper.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/package.json b/package.json
index 5f7b7014a..d83c1d095 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"scripts": {
"clean": "shx rm -rf _bundles lib",
"build:bundle": "webpack",
- "build:commonjs": "tsc; copyfiles -u 2 ./src/artifacts/*.json ./../0x.js/lib/src/artifacts;",
+ "build:commonjs": "tsc; copyfiles -u 2 ./src/artifacts/*.json ../0x.js/lib/src/artifacts;",
"build": "npm run clean && run-p build:*",
"lint": "tslint src/ts/**/*",
"test": "run-s clean build:commonjs && mocha lib/test/**/*_test.js",
@@ -20,7 +20,7 @@
"docs:json": "typedoc --json docs/index.json .",
"docs:generate": "typedoc --out docs .",
"docs:open": "opn docs/index.html",
- "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ./../contracts/build/contracts/$i.json ./../0x.js/src/artifacts; done;",
+ "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;",
"testrpc": "testrpc -p 8545 --networkId 50"
},
"config": {
diff --git a/src/ts/web3_wrapper.ts b/src/ts/web3_wrapper.ts
index 24938e396..97d04db8c 100644
--- a/src/ts/web3_wrapper.ts
+++ b/src/ts/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 = /^0[xX][0]*$/;
+ const zeroHexAddressRegex = /^0x0*$/i;
const didFindCode = _.isNull(code.match(zeroHexAddressRegex));
return didFindCode;
}