diff --git a/public/views/preferencesGlobal.html b/public/views/preferencesGlobal.html index a2994f6c2..9ab5e9878 100644 --- a/public/views/preferencesGlobal.html +++ b/public/views/preferencesGlobal.html @@ -49,8 +49,8 @@
Use Unconfirmed Funds
  • - -
    Enable notifications
    + +
    Enable push notifications
  • diff --git a/src/js/controllers/preferencesGlobal.js b/src/js/controllers/preferencesGlobal.js index 36184f34a..86c3a2b88 100644 --- a/src/js/controllers/preferencesGlobal.js +++ b/src/js/controllers/preferencesGlobal.js @@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController', $scope.spendUnconfirmed = config.wallet.spendUnconfirmed; $scope.glideraEnabled = config.glidera.enabled; $scope.glideraTestnet = config.glidera.testnet; - $scope.notifications = config.notifications ? config.notifications.enabled : true; + $scope.pushNotifications = config.pushNotifications.enabled; }; if (isMobile.Android() || isMobile.iOS()) $scope.mobile = true; @@ -33,7 +33,7 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController', }); }); - var unwatchNotification = $scope.$watch('notifications', function(newVal, oldVal) { + var unwatchPushNotifications = $scope.$watch('pushNotifications', function(newVal, oldVal) { if (newVal == oldVal) return; var opts = { pushNotifications: { @@ -79,5 +79,6 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController', unwatchSpendUnconfirmed(); unwatchGlideraEnabled(); unwatchGlideraTestnet(); + unwatchPushNotifications(); }); }); diff --git a/src/js/services/pushNotificationsService.js b/src/js/services/pushNotificationsService.js index ca4b72370..d53de26fc 100644 --- a/src/js/services/pushNotificationsService.js +++ b/src/js/services/pushNotificationsService.js @@ -38,7 +38,7 @@ angular.module('copayApp.services') opts.token = token; root.subscribe(opts, wallet.id, function(err, response) { if (err) $log.warn('Error: ' + err.code); - $log.debug('Suscribed: ' + JSON.stringify(response)); + $log.debug('Suscribed to push notifications service: ' + JSON.stringify(response)); }); }); }); @@ -48,7 +48,7 @@ angular.module('copayApp.services') lodash.forEach(profileService.getWallets('testnet'), function(wallet) { root.unsubscribe(wallet.id, function(err, response) { if (err) $log.warn('Error: ' + err.code); - $log.debug('Unsubscribed: ' + response); + $log.debug('Unsubscribed from push notifications service'); }); }); }