change wallet version when storing

This commit is contained in:
Ivan Socolsky 2014-12-02 17:24:37 -03:00
commit ad02e46f56
3 changed files with 66 additions and 2 deletions

View file

@ -239,6 +239,7 @@ Identity.prototype.retrieveWalletFromStorage = function(walletId, opts, cb) {
Identity.prototype.storeWallet = function(wallet, cb) {
preconditions.checkArgument(wallet && _.isObject(wallet));
wallet.setVersion(this.version);
var val = wallet.toObj();
var key = wallet.getStorageKey();
log.debug('Storing wallet:' + wallet.getName());