wallet: minor.

This commit is contained in:
Christopher Jeffrey 2017-10-20 06:35:59 -07:00
parent 9a8106f4f7
commit 645cafe653
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 5 additions and 6 deletions

View File

@ -815,6 +815,7 @@ Account.prototype.inspect = function inspect() {
const nested = this.nestedAddress();
return {
id: this.id,
wid: this.wid,
name: this.name,
network: this.network.type,
@ -843,14 +844,12 @@ Account.prototype.inspect = function inspect() {
* @returns {Object}
*/
Account.prototype.toJSON = function toJSON(minimal, balance) {
Account.prototype.toJSON = function toJSON(balance) {
const receive = this.receiveAddress();
const change = this.changeAddress();
const nested = this.nestedAddress();
return {
wid: minimal ? undefined : this.wid,
id: minimal ? undefined : this.id,
name: this.name,
initialized: this.initialized,
witness: this.witness,

View File

@ -264,7 +264,7 @@ HTTPServer.prototype.initRouter = function initRouter() {
const balance = await req.wallet.getBalance(account.accountIndex);
res.send(200, account.toJSON(false, balance));
res.send(200, account.toJSON(balance));
});
// Create account (compat)
@ -286,7 +286,7 @@ HTTPServer.prototype.initRouter = function initRouter() {
const account = await req.wallet.createAccount(options, passphrase);
const balance = await req.wallet.getBalance(account.accountIndex);
res.send(200, account.toJSON(false, balance));
res.send(200, account.toJSON(balance));
});
// Create account
@ -308,7 +308,7 @@ HTTPServer.prototype.initRouter = function initRouter() {
const account = await req.wallet.createAccount(options, passphrase);
const balance = await req.wallet.getBalance(account.accountIndex);
res.send(200, account.toJSON(false, balance));
res.send(200, account.toJSON(balance));
});
// Change passphrase