From 8bc84d397d42fa4695de3806107a397506f9d2c4 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 31 Aug 2016 15:16:00 -0300 Subject: [PATCH] . --- public/views/activity.html | 2 +- public/views/includes/walletActivity.html | 2 +- public/views/tab-home.html | 14 ++++++-------- src/js/controllers/tab-home.js | 3 ++- src/js/services/profileService.js | 4 +++- src/js/services/walletService.js | 9 ++++++++- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/public/views/activity.html b/public/views/activity.html index d10d45479..bfbc44076 100644 --- a/public/views/activity.html +++ b/public/views/activity.html @@ -19,7 +19,7 @@
-
+
diff --git a/public/views/includes/walletActivity.html b/public/views/includes/walletActivity.html index 76931d556..149ec0cc5 100644 --- a/public/views/includes/walletActivity.html +++ b/public/views/includes/walletActivity.html @@ -38,5 +38,5 @@ {{x.wallet.name}}

- + diff --git a/public/views/tab-home.html b/public/views/tab-home.html index 0c258b9e6..402f9d6f3 100644 --- a/public/views/tab-home.html +++ b/public/views/tab-home.html @@ -5,9 +5,10 @@ -
-
+
+
Recent Activity +
diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index b6886b5c2..631f87441 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -35,7 +35,8 @@ angular.module('copayApp.controllers').controller('tabHomeController', }); walletService.getNotifications(wallet, { - timeSpan: timeSpan + timeSpan: timeSpan, + includeOwn: true, }, function(err, n) { if (err) { console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 1d6e5ffdb..61a9f4e9a 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -130,7 +130,9 @@ angular.module('copayApp.services') }); }); - wallet.initialize({}, function(err) { + wallet.initialize({ + notificationIncludeOwn: true, + }, function(err) { if (err) { $log.error('Could not init notifications err:', err); return; diff --git a/src/js/services/walletService.js b/src/js/services/walletService.js index bdfe1a291..7eea001d0 100644 --- a/src/js/services/walletService.js +++ b/src/js/services/walletService.js @@ -981,8 +981,15 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim wallet.getNotifications(opts, function(err, notifications) { if (err) return cb(err); + var ignored = { + 'NewBlock': 1, + 'BalanceUpdated': 1, + 'NewOutgoingTxByThirdParty': 1, + 'NewAddress': 1, + }; + notifications = lodash.filter(notifications, function(x) { - return x.type != 'NewBlock' && x.type != 'BalanceUpdated' && x.type != 'NewOutgoingTxByThirdParty'; + return !ignored[x.type]; }); var idToName = {};