Skip empty token and tokenTime on wallet serialization
This commit is contained in:
parent
ddffc9810c
commit
4439bed74c
1 changed files with 5 additions and 2 deletions
|
|
@ -168,12 +168,15 @@ Wallet.prototype._optsToObj = function() {
|
||||||
requiredCopayers: this.requiredCopayers,
|
requiredCopayers: this.requiredCopayers,
|
||||||
totalCopayers: this.totalCopayers,
|
totalCopayers: this.totalCopayers,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
token: this.token,
|
|
||||||
tokenTime: new Date().getTime(),
|
|
||||||
netKey: this.netKey,
|
netKey: this.netKey,
|
||||||
version: this.version,
|
version: this.version,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (this.token){
|
||||||
|
obj.token = this.token;
|
||||||
|
obj.tokenTime = new Date().getTime();
|
||||||
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue