store wallet first then bind
This commit is contained in:
parent
e513059d3e
commit
e98253adf1
1 changed files with 5 additions and 3 deletions
|
|
@ -683,12 +683,14 @@ Identity.prototype.createWallet = function(opts, cb) {
|
|||
if (self.getWalletById(w.getId())) {
|
||||
return cb('walletAlreadyExists');
|
||||
}
|
||||
self.addWallet(w);
|
||||
self.updateFocusedTimestamp(w.getId());
|
||||
self.bindWallet(w);
|
||||
|
||||
self.storeWallet(w, function(err) {
|
||||
if (err) return cb(err);
|
||||
|
||||
self.addWallet(w);
|
||||
self.updateFocusedTimestamp(w.getId());
|
||||
self.bindWallet(w);
|
||||
|
||||
self.backupNeeded = true;
|
||||
self.store({
|
||||
noWallets: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue