Merge pull request #3799 from gabrielbazan7/feat/pushNotificationsRefactor

push notifications in livenet - testnet
This commit is contained in:
Matias Alejo Garcia 2016-01-21 19:24:21 -03:00
commit 4470688e81
2 changed files with 7 additions and 5 deletions

View File

@ -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');
};

View File

@ -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');