wallet: minor.
This commit is contained in:
parent
9a8106f4f7
commit
645cafe653
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user