mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #3799 from gabrielbazan7/feat/pushNotificationsRefactor
push notifications in livenet - testnet
This commit is contained in:
commit
4470688e81
|
@ -672,9 +672,11 @@ angular.module('copayApp.services')
|
|||
copayerId: c.copayerId
|
||||
};
|
||||
});
|
||||
if (network) {
|
||||
ret = lodash.filter(ret, function(w) {
|
||||
return (w.network == network);
|
||||
});
|
||||
}
|
||||
return lodash.sortBy(ret, 'name');
|
||||
};
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue