From 9f7258c4b3facd5347280e5670026eca434ff3d4 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Fri, 15 Mar 2019 15:41:56 +0100 Subject: [PATCH] [fix] Wallets: resetting the view when logout [fix] Wallets: do not display balance if wallet item not loaded --- www/js/controllers/wallets-controllers.js | 2 ++ www/templates/wallet/list/item_wallet.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/www/js/controllers/wallets-controllers.js b/www/js/controllers/wallets-controllers.js index f61b50376..f6306fc47 100644 --- a/www/js/controllers/wallets-controllers.js +++ b/www/js/controllers/wallets-controllers.js @@ -620,8 +620,10 @@ function WalletSelectModalController($scope, $q, $timeout, UIUtils, filterTransl // Clean controller data $scope.resetData = function() { + console.debug("[wallets] Cleaning wallet list"); $scope.wallets = null; $scope.loading = true; + $scope.entered = false; $scope.formData.balance = undefined; $scope.formData.updatingWalletId = undefined; }; diff --git a/www/templates/wallet/list/item_wallet.html b/www/templates/wallet/list/item_wallet.html index 223151db9..8e1072ea3 100644 --- a/www/templates/wallet/list/item_wallet.html +++ b/www/templates/wallet/list/item_wallet.html @@ -27,7 +27,7 @@ <cs-extension-point name="item-wallet"></cs-extension-point> - <span class="badge" ng-if="formData.showBalance" + <span class="badge" ng-if=":rebind:formData.showBalance && walletData.loaded" ng-class=":rebind:{'badge-assertive': (walletData.balance <= 0), 'badge-balanced': (walletData.balance > 0) }"> <ion-spinner class="ion-spinner-small" ng-if="formData.updatingWalletId==wallet.id" icon="android"></ion-spinner> <span ng-bind-html=":rebind:walletData.balance|formatAmount:{useRelative: formData.useRelative, currency: currency}"></span> -- GitLab