node: only add wallet addr if no others are available.

This commit is contained in:
Christopher Jeffrey 2017-02-28 14:01:47 -08:00
parent e80c98d4e8
commit 21bc517f8b
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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;
});
/*