From dc21ac2a8ccdc8271e3323b0892423b823061518 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 19 Oct 2016 09:57:55 -0300 Subject: [PATCH] Show contact if exist on tx list --- src/js/directives/directives.js | 13 ++++++++++--- www/views/walletDetails.html | 3 +-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/js/directives/directives.js b/src/js/directives/directives.js index ecf849b10..5334924f5 100644 --- a/src/js/directives/directives.js +++ b/src/js/directives/directives.js @@ -113,10 +113,13 @@ angular.module('copayApp.directives') } } }) - .directive('contact', ['addressbookService', 'lodash', - function(addressbookService, lodash) { + .directive('contact', ['addressbookService', 'lodash', 'gettextCatalog', + function(addressbookService, lodash, gettextCatalog) { return { restrict: 'E', + scope: { + label: '=' + }, link: function(scope, element, attrs) { var addr = attrs.address; addressbookService.get(addr, function(err, ab) { @@ -124,7 +127,11 @@ angular.module('copayApp.directives') var name = lodash.isObject(ab) ? ab.name : ab; element.append(name); } else { - element.append(addr); + if (scope.label && scope.label == 'Sent') { + element.append(gettextCatalog.getString('Sent')); + } else { + element.append(addr); + } } }); } diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index ae768eddb..f63f52c19 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -161,8 +161,7 @@
{{btx.message}}
{{btx.note.body}}
-
{{wallet.addressbook[btx.addressTo]}}
-
Sent
+