From 3d6820eb956c7b6dcc49d7b31566c68d88405178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Thu, 6 Oct 2016 12:14:44 -0300 Subject: [PATCH 1/3] add push notifications init to bind wallet --- src/js/services/profileService.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index ee40f741b..d9e3fc9c8 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -296,6 +296,8 @@ angular.module('copayApp.services') if (!val) { return cb(new Error('NONAGREEDDISCLAIMER: Non agreed disclaimer')); } + if (usePushNotifications) + root.pushNotificationsInit(); return cb(); }); }); From 66cea8df9d913f1995454caa7ed0589d12ff2e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Thu, 6 Oct 2016 12:17:32 -0300 Subject: [PATCH 2/3] add error event --- src/js/services/profileService.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index d9e3fc9c8..d4cf3be01 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -333,6 +333,11 @@ angular.module('copayApp.services') }, 100); } }); + + push.on('error', function(e) { + $log.error(e.message); + }); + }; root.loadAndBindProfile = function(cb) { From 92b4d32efeca4ca64c65496e806dc127d59a461e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 7 Oct 2016 14:57:36 -0300 Subject: [PATCH 3/3] refactor --- src/js/services/profileService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index d4cf3be01..30563208b 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -335,7 +335,7 @@ angular.module('copayApp.services') }); push.on('error', function(e) { - $log.error(e.message); + $log.warn('Error with push notifications:' + e.message); }); };