diff --git a/js/controllers/header.js b/js/controllers/header.js index 523d55955..331fa668d 100644 --- a/js/controllers/header.js +++ b/js/controllers/header.js @@ -28,11 +28,11 @@ angular.module('copay.header').controller('HeaderController', }); // Initialize alert notification (not show when init wallet) - $rootScope.showTxAlert = 0; + $rootScope.txAlertCount = 0; $notification.enableHtml5Mode(); // for chrome: if support, enable it - $rootScope.$watch('showTxAlert', function(showTxAlert) { - if (showTxAlert && showTxAlert > 0) { - $notification.info('New Transaction', ($rootScope.showTxAlert == 1) ? 'You have pending a transaction proposal' : 'You have pending ' + $rootScope.showTxAlert + ' transaction proposals', showTxAlert); + $rootScope.$watch('txAlertCount', function(txAlertCount) { + if (txAlertCount && txAlertCount > 0) { + $notification.info('New Transaction', ($rootScope.txAlertCount == 1) ? 'You have a pending transaction proposal' : 'You have ' + $rootScope.txAlertCount + ' pending transaction proposals', txAlertCount); } }); diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index 9a76287ca..a4abebd72 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -160,7 +160,7 @@ angular.module('copay.controllerUtils') $rootScope.txs = txs; if ($rootScope.pendingTxCount < pending) { - $rootScope.showTxAlert = pending; + $rootScope.txAlertCount = pending; } $rootScope.pendingTxCount = pending; w.removeListener('txProposalsUpdated',root.updateTxs)