Merge pull request #2262 from isocolsky/quota
Do not create wallet on storage fail
This commit is contained in:
commit
598dc7bc0e
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