Move wallet-info to settings. Fix removing last wallet

This commit is contained in:
Gustavo Maximiliano Cortez 2015-01-14 14:53:20 -03:00
commit 5b1463af60
8 changed files with 171 additions and 204 deletions

View file

@ -218,6 +218,9 @@ Identity.prototype.deleteWallet = function(walletId, cb) {
self.storage.removeItem(Wallet.getStorageKey(walletId), function(err) {
if (err) return cb(err);
self.emitAndKeepAlive('walletDeleted', walletId);
if (!self.walletIds.length) {
self.emitAndKeepAlive('noWallets')
}
self.store({
noWallets: true
}, cb);