fix subscribe only when push notifications is enable
This commit is contained in:
parent
58b573ac4e
commit
070669d835
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue