Merge pull request #5386 from antonio-fr/master

Fix wallet deletion without push
This commit is contained in:
Javier Donadío 2017-01-06 17:48:30 -03:00 committed by GitHub
commit 611654e25e
1 changed files with 6 additions and 4 deletions

View File

@ -480,6 +480,8 @@ angular.module('copayApp.services')
root.deleteWalletClient = function(client, cb) {
var walletId = client.credentials.walletId;
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');