toJSON fixes.
This commit is contained in:
parent
d2205241ee
commit
c8da41aa9d
@ -634,7 +634,7 @@ Block.prototype.inspect = function inspect() {
|
||||
|
||||
Block.prototype.toJSON = function toJSON() {
|
||||
return {
|
||||
v: '1',
|
||||
v: 1,
|
||||
type: 'block',
|
||||
subtype: this.subtype,
|
||||
hash: this.hash('hex'),
|
||||
|
||||
@ -1387,7 +1387,7 @@ TX.prototype.inspect = function inspect() {
|
||||
TX.prototype.toJSON = function toJSON() {
|
||||
// Compact representation
|
||||
return {
|
||||
v: '1',
|
||||
v: 1,
|
||||
type: 'tx',
|
||||
ts: this.ts,
|
||||
ps: this.ps,
|
||||
|
||||
@ -658,7 +658,8 @@ Wallet.prototype.toJSON = function toJSON(encrypt) {
|
||||
network: network.type,
|
||||
encrypted: encrypt ? true : false,
|
||||
label: this.label,
|
||||
address: this.getAddress(),
|
||||
address: this.getKeyAddress(),
|
||||
scriptaddress: this.getScriptAddress(),
|
||||
balance: utils.toBTC(this.balance()),
|
||||
pub: this.getPublicKey('hex'),
|
||||
priv: encrypt
|
||||
|
||||
Loading…
Reference in New Issue
Block a user