diff --git a/package.json b/package.json index c140089e9c..95481cce4a 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "ace-mode-solidity": "^0.1.0", "async": "^2.1.2", "babel-eslint": "^7.1.1", + "babel-plugin-transform-modern-regexp": "0.0.6", "babel-plugin-transform-object-assign": "^6.22.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-plugin-yo-yoify": "^0.3.3", @@ -111,7 +112,8 @@ "transform-es2015-spread", "transform-es2015-parameters", "transform-es2015-destructuring", - "transform-es2015-block-scoping" + "transform-es2015-block-scoping", + "transform-modern-regexp" ] }, "browserify": { diff --git a/src/universal-dapp.js b/src/universal-dapp.js index 85a2d49b8e..3dbeddfa3e 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -124,11 +124,11 @@ module.exports = class UniversalDApp extends UdappApi { stateManager.getAccount(address, (error, account) => { if (error) return console.log(error) account.balance = balance || '0xf00000000000000001' - stateManager.putAccount(address, account, function cb (error) { - if (error) console.log(error) + stateManager.putAccount(address, account, function cb (error) { + if (error) console.log(error) }) }) - + this.accounts['0x' + address.toString('hex')] = { privateKey, nonce: 0 } } }