move update indexes to the loading screen
This commit is contained in:
parent
0958d9686e
commit
386a5bea6f
2 changed files with 18 additions and 18 deletions
|
|
@ -71,14 +71,19 @@ WalletFactory.prototype.fromEncryptedObj = function(base64, password) {
|
|||
var walletObj = this.storage.import(base64);
|
||||
if (!walletObj) return false;
|
||||
var w = this.fromObj(walletObj);
|
||||
var self = this;
|
||||
w.updateIndexes(function(err) {
|
||||
if (err) throw err;
|
||||
self.log('Indexes updated');
|
||||
});
|
||||
return w;
|
||||
};
|
||||
|
||||
WalletFactory.prototype.import = function(base64, password, cb) {
|
||||
var self = this;
|
||||
var w = self.fromEncryptedObj(base64, password);
|
||||
w.updateIndexes(function(err) {
|
||||
if (err) return cb(err);
|
||||
self.log('Indexes updated');
|
||||
cb(null, w);
|
||||
});
|
||||
}
|
||||
|
||||
WalletFactory.prototype.read = function(walletId) {
|
||||
if (!this._checkRead(walletId))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue