diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index ae40986b8..dabffc717 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -480,10 +480,12 @@ angular.module('copayApp.services') root.deleteWalletClient = function(client, cb) { var walletId = client.credentials.walletId; - pushNotificationsService.unsubscribe(root.getWallet(walletId), function(err) { - if (err) $log.warn('Unsubscription error: ' + err.message); - else $log.debug('Unsubscribed from push notifications service'); - }); + var config = configService.getSync(); + if (config.pushNotifications.enabled) + pushNotificationsService.unsubscribe(root.getWallet(walletId), function(err) { + if (err) $log.warn('Unsubscription error: ' + err.message); + else $log.debug('Unsubscribed from push notifications service'); + }); $log.debug('Deleting Wallet:', client.credentials.walletName); client.removeAllListeners();