Fix js error when selecting an incomplete wallet

This commit is contained in:
Gustavo Maximiliano Cortez 2016-06-23 11:58:32 -03:00
commit 1d1f95db5d
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
2 changed files with 5 additions and 5 deletions

View file

@ -25,7 +25,8 @@ angular.module('copayApp.controllers').controller('sidebarController',
};
self.switchWallet = function(selectedWalletId, currentWalletId) {
if (selectedWalletId == currentWalletId) return;
var client = profileService.focusedClient;
if (selectedWalletId == currentWalletId && client.isComplete()) return;
self.walletSelection = false;
profileService.setAndStoreFocus(selectedWalletId, function() {});
$ionicScrollDelegate.scrollTop();