From a3949efbfd002476448cf4e0b2ca433ca8f40993 Mon Sep 17 00:00:00 2001 From: Gabriel Masclef Date: Fri, 14 Jul 2017 15:45:18 -0300 Subject: [PATCH] Names fixes --- src/js/controllers/confirm.js | 2 +- src/js/controllers/preferencesNotifications.js | 12 ++++++------ src/js/controllers/tx-details.js | 2 +- src/js/services/configService.js | 2 +- www/views/preferencesNotifications.html | 4 ++-- www/views/tx-details.html | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index e5022ab00..49e84cb89 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -509,7 +509,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( walletService.publishAndSign(wallet, txp, function(err, txp) { if (err) return setSendError(err); - if (config.notifyIfTxConfirmed && config.notifyIfTxConfirmed.enabled) { + if (config.confirmedTxsNotifications && config.confirmedTxsNotifications.enabled) { txConfirmNotification.subscribe(wallet, { txid: txp.txid }); diff --git a/src/js/controllers/preferencesNotifications.js b/src/js/controllers/preferencesNotifications.js index bb407e100..3d78e98db 100644 --- a/src/js/controllers/preferencesNotifications.js +++ b/src/js/controllers/preferencesNotifications.js @@ -12,9 +12,9 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr value: config.pushNotificationsEnabled }; - var isNotifyTxEnabled = config.notifyIfTxConfirmed ? config.notifyIfTxConfirmed.enabled : false; - $scope.notifyIfTxConfirmed = { - value: isNotifyTxEnabled + var isConfirmedTxsNotificationsEnabled = config.confirmedTxsNotifications ? config.confirmedTxsNotifications.enabled : false; + $scope.confirmedTxsNotifications = { + value: isConfirmedTxsNotificationsEnabled }; $scope.latestEmail = { @@ -47,11 +47,11 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr }); }; - $scope.notifyIfTxConfirmedChange = function() { + $scope.confirmedTxsNotificationsChange = function() { if (!$scope.pushNotifications) return; var opts = { - notifyIfTxConfirmed: { - enabled: $scope.notifyIfTxConfirmed.value + confirmedTxsNotifications: { + enabled: $scope.confirmedTxsNotifications.value } }; configService.set(opts, function(err) { diff --git a/src/js/controllers/tx-details.js b/src/js/controllers/tx-details.js index 85714850f..0c277e469 100644 --- a/src/js/controllers/tx-details.js +++ b/src/js/controllers/tx-details.js @@ -13,7 +13,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio $scope.color = $scope.wallet.color; $scope.copayerId = $scope.wallet.credentials.copayerId; $scope.isShared = $scope.wallet.credentials.n > 1; - $scope.notifyIfTxConfirmed = config.notifyIfTxConfirmed ? config.notifyIfTxConfirmed.enabled : false; + $scope.txsUnsubscribedForNotifications = config.confirmedTxsNotifications ? !config.confirmedTxsNotifications.enabled : true; txConfirmNotification.checkIfEnabled(txId, function(res) { $scope.txNotification = { diff --git a/src/js/services/configService.js b/src/js/services/configService.js index b736dcae5..c128208c4 100644 --- a/src/js/services/configService.js +++ b/src/js/services/configService.js @@ -80,7 +80,7 @@ angular.module('copayApp.services').factory('configService', function(storageSer pushNotificationsEnabled: true, - notifyIfTxConfirmed: { + confirmedTxsNotifications: { enabled: true, }, diff --git a/www/views/preferencesNotifications.html b/www/views/preferencesNotifications.html index 8673138c7..a2d7ee725 100644 --- a/www/views/preferencesNotifications.html +++ b/www/views/preferencesNotifications.html @@ -19,8 +19,8 @@ -
- +
+ Notify me when transactions are confirmed
diff --git a/www/views/tx-details.html b/www/views/tx-details.html index ff1812355..de7ab9977 100644 --- a/www/views/tx-details.html +++ b/www/views/tx-details.html @@ -108,7 +108,7 @@ This transaction amount is too small compared to current Bitcoin network fees. S
-
+