From 1693e9e02e2400d62adc9f0953dc1f08868ec5a8 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 23 Jan 2017 10:51:39 -0300 Subject: [PATCH] Fix wording --- src/js/controllers/preferencesDelete.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/preferencesDelete.js b/src/js/controllers/preferencesDelete.js index ecf2c0807..442cb7b0d 100644 --- a/src/js/controllers/preferencesDelete.js +++ b/src/js/controllers/preferencesDelete.js @@ -5,12 +5,18 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro $scope.$on("$ionicView.beforeEnter", function(event, data) { if (!data.stateParams || !data.stateParams.walletId) { - popupService.showAlert(null, gettextCatalog.getString('Bad param'), function() { + popupService.showAlert(null, gettextCatalog.getString('No wallet selected'), function() { $ionicHistory.goBack(); }); return; } $scope.wallet = profileService.getWallet(data.stateParams.walletId); + if (!$scope.wallet) { + popupService.showAlert(null, gettextCatalog.getString('No wallet found'), function() { + $ionicHistory.goBack(); + }); + return; + } $scope.alias = lodash.isEqual($scope.wallet.name, $scope.wallet.credentials.walletName) ? null : $scope.wallet.name + ' '; $scope.walletName = $scope.wallet.credentials.walletName; });