Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit f2c518d

Browse files
Update to TestRPC v6.0.1
1 parent 0c1c052 commit f2c518d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"electron-compile": "^6.4.2",
124124
"electron-settings": "^3.1.2",
125125
"electron-squirrel-startup": "^1.0.0",
126-
"ethereumjs-testrpc": "^4.1.3",
126+
"ethereumjs-testrpc": "^6.0.1",
127127
"ethereumjs-units": "^0.2.0",
128128
"find-process": "^1.1.0",
129129
"lodash": "^3.10.1",

src/chain.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,19 @@ function startServer(options) {
5959
oldSendAsync(payload, callback)
6060
}
6161

62-
server.listen(options.port, options.hostname, function(err, state) {
62+
server.listen(options.port, options.hostname, function(err, result) {
6363
if (err) {
6464
process.send({type: 'start-error', data: err});
6565
return
6666
}
6767

68+
var state = result ? result : server.provider.manager.state;
69+
70+
if (!state) {
71+
process.send({type: 'start-error', data: "Couldn't get a reference to TestRPC's StateManager."});
72+
return
73+
}
74+
6875
var data = {
6976
mnemonic: state.mnemonic,
7077
hdPath: state.wallet_hdpath,

0 commit comments

Comments
 (0)