mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #2739 from matiu/bug/delete-fileSto
fix delete wallet in fileStorage
This commit is contained in:
commit
3c2c33bdcc
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue