From 21bc517f8bcfc9864af72522364003ca28279c87 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 28 Feb 2017 14:01:47 -0800 Subject: [PATCH] node: only add wallet addr if no others are available. --- lib/node/node.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/node/node.js b/lib/node/node.js index b1ddffe6..c8b73d64 100644 --- a/lib/node/node.js +++ b/lib/node/node.js @@ -305,10 +305,13 @@ Node.prototype.openWallet = co(function* openWallet() { 'Loaded wallet with id=%s wid=%d address=%s', wallet.id, wallet.wid, wallet.getAddress()); - if (this.miner) + if (this.miner && this.miner.addresses.length === 0) this.miner.addAddress(wallet.getAddress()); this.wallet = wallet; + + if (this.http && this.http.rpc && !this.http.rpc.wallet) + this.http.rpc.wallet = wallet; }); /*