Skip empty token and tokenTime on wallet serialization

This commit is contained in:
Yemel Jardi 2014-05-23 08:56:25 -07:00
parent ddffc9810c
commit 4439bed74c
1 changed files with 5 additions and 2 deletions

View File

@ -168,12 +168,15 @@ Wallet.prototype._optsToObj = function() {
requiredCopayers: this.requiredCopayers,
totalCopayers: this.totalCopayers,
name: this.name,
token: this.token,
tokenTime: new Date().getTime(),
netKey: this.netKey,
version: this.version,
};
if (this.token){
obj.token = this.token;
obj.tokenTime = new Date().getTime();
}
return obj;
};