From 070669d835ba08965244ba83f84c3b25d670f8a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Mon, 18 Jan 2016 14:22:42 -0300 Subject: [PATCH] fix subscribe only when push notifications is enable --- src/js/services/profileService.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index b66f487ff..1d1724938 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -371,6 +371,7 @@ angular.module('copayApp.services') return cb(gettext('Wallet already in Copay' + ": ") + w.walletName); } + var config = configService.getSync(); var defaults = configService.getDefaults(); var bwsFor = {}; bwsFor[walletId] = opts.bwsurl || defaults.bws.url; @@ -401,7 +402,8 @@ angular.module('copayApp.services') handleImport(function() { root.setAndStoreFocus(walletId, function() { storageService.storeProfile(root.profile, function(err) { - $rootScope.$emit('Local/SubscribeNotifications'); + if (config.pushNotifications.enabled) + $rootScope.$emit('Local/SubscribeNotifications'); return cb(err, walletId); }); });