add store Profile on adding wallets
This commit is contained in:
parent
ae4dd9a54b
commit
08dc892887
3 changed files with 16 additions and 15 deletions
|
|
@ -228,6 +228,8 @@ Identity.prototype.exportWithWalletInfo = function(opts) {
|
|||
* @param {Function} cb
|
||||
*/
|
||||
Identity.prototype.store = function(opts, cb) {
|
||||
log.debug('Storing profile');
|
||||
|
||||
var self = this;
|
||||
opts = opts || {};
|
||||
|
||||
|
|
@ -348,14 +350,10 @@ Identity.importFromFullJson = function(str, password, opts, cb) {
|
|||
callback();
|
||||
});
|
||||
}, function(err, results) {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
if (err) return cb(err);
|
||||
|
||||
iden.store(null, function(err) {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
return cb(null, iden);
|
||||
return cb(err, iden);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -384,7 +382,9 @@ Identity.prototype.bindWallet = function(w) {
|
|||
});
|
||||
w.on('ready', function() {
|
||||
log.debug('<ready> Wallet' + w.getName());
|
||||
self.storeWallet(w);
|
||||
self.store({noWallets:true}, function() {
|
||||
self.storeWallet(w);
|
||||
});
|
||||
});
|
||||
w.on('addressBookUpdated', function() {
|
||||
log.debug('<addressBookUpdated> Wallet' + w.getName());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue