From c17fe98cec5bdb46170523dfe13e7730ac5ed182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Thu, 21 Jan 2016 17:16:40 -0300 Subject: [PATCH] enable livenet push notifications --- src/js/services/profileService.js | 8 +++++--- src/js/services/pushNotificationsService.js | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 1d1724938..952882480 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -672,9 +672,11 @@ angular.module('copayApp.services') copayerId: c.copayerId }; }); - ret = lodash.filter(ret, function(w) { - return (w.network == network); - }); + if (network) { + ret = lodash.filter(ret, function(w) { + return (w.network == network); + }); + } return lodash.sortBy(ret, 'name'); }; diff --git a/src/js/services/pushNotificationsService.js b/src/js/services/pushNotificationsService.js index 2e7292e6b..a5f726582 100644 --- a/src/js/services/pushNotificationsService.js +++ b/src/js/services/pushNotificationsService.js @@ -37,7 +37,7 @@ angular.module('copayApp.services') if (!usePushNotifications) return; storageService.getDeviceToken(function(err, token) { - lodash.forEach(profileService.getWallets('testnet'), function(wallet) { + lodash.forEach(profileService.getWallets(null), function(wallet) { var opts = {}; opts.type = isMobile.iOS() ? "ios" : isMobile.Android() ? "android" : null; opts.token = token; @@ -52,7 +52,7 @@ angular.module('copayApp.services') root.disableNotifications = function() { if (!usePushNotifications) return; - lodash.forEach(profileService.getWallets('testnet'), function(wallet) { + lodash.forEach(profileService.getWallets(null), function(wallet) { root.unsubscribe(wallet.id, function(err) { if (err) $log.warn('Subscription error: ' + err.code); else $log.debug('Unsubscribed from push notifications service');