Merge pull request #3799 from gabrielbazan7/feat/pushNotificationsRefactor
push notifications in livenet - testnet
This commit is contained in:
commit
4470688e81
2 changed files with 7 additions and 5 deletions
|
|
@ -672,9 +672,11 @@ angular.module('copayApp.services')
|
||||||
copayerId: c.copayerId
|
copayerId: c.copayerId
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
ret = lodash.filter(ret, function(w) {
|
if (network) {
|
||||||
return (w.network == network);
|
ret = lodash.filter(ret, function(w) {
|
||||||
});
|
return (w.network == network);
|
||||||
|
});
|
||||||
|
}
|
||||||
return lodash.sortBy(ret, 'name');
|
return lodash.sortBy(ret, 'name');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ angular.module('copayApp.services')
|
||||||
if (!usePushNotifications) return;
|
if (!usePushNotifications) return;
|
||||||
|
|
||||||
storageService.getDeviceToken(function(err, token) {
|
storageService.getDeviceToken(function(err, token) {
|
||||||
lodash.forEach(profileService.getWallets('testnet'), function(wallet) {
|
lodash.forEach(profileService.getWallets(null), function(wallet) {
|
||||||
var opts = {};
|
var opts = {};
|
||||||
opts.type = isMobile.iOS() ? "ios" : isMobile.Android() ? "android" : null;
|
opts.type = isMobile.iOS() ? "ios" : isMobile.Android() ? "android" : null;
|
||||||
opts.token = token;
|
opts.token = token;
|
||||||
|
|
@ -52,7 +52,7 @@ angular.module('copayApp.services')
|
||||||
root.disableNotifications = function() {
|
root.disableNotifications = function() {
|
||||||
if (!usePushNotifications) return;
|
if (!usePushNotifications) return;
|
||||||
|
|
||||||
lodash.forEach(profileService.getWallets('testnet'), function(wallet) {
|
lodash.forEach(profileService.getWallets(null), function(wallet) {
|
||||||
root.unsubscribe(wallet.id, function(err) {
|
root.unsubscribe(wallet.id, function(err) {
|
||||||
if (err) $log.warn('Subscription error: ' + err.code);
|
if (err) $log.warn('Subscription error: ' + err.code);
|
||||||
else $log.debug('Unsubscribed from push notifications service');
|
else $log.debug('Unsubscribed from push notifications service');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue