Merge pull request #5386 from antonio-fr/master
Fix wallet deletion without push
This commit is contained in:
commit
611654e25e
1 changed files with 6 additions and 4 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue