Merge pull request #2739 from matiu/bug/delete-fileSto

fix delete wallet in fileStorage
This commit is contained in:
Gustavo Maximiliano Cortez 2015-05-18 10:40:30 -03:00
commit 3c2c33bdcc
2 changed files with 7 additions and 6 deletions

View File

@ -24,18 +24,19 @@ angular.module('copayApp.services')
$log.debug('Set focus:', walletId);
// Set local object
root.focusedClient = root.walletClients[walletId];
if (walletId)
root.focusedClient = root.walletClients[walletId];
else
root.focusedClient = [];
if (lodash.isEmpty(root.focusedClient)) {
root.focusedClient = root.walletClients[lodash.keys(root.walletClients)[0]];
}
// Still nothing?
if (lodash.isEmpty(root.focusedClient)) {
$rootScope.$emit('Local/NoWallets');
}
// set if completed
if (!lodash.isEmpty(root.focusedClient)) {
} else {
$rootScope.$emit('Local/NewFocusedWallet');
}

View File

@ -124,7 +124,7 @@ angular.module('copayApp.services')
};
root.storeFocusedWalletId = function(id, cb) {
storage.set('focusedWalletId', id, cb);
storage.set('focusedWalletId', id||'', cb);
};
root.getFocusedWalletId = function(cb) {