Show contact if exist on tx list
This commit is contained in:
parent
9b19f7b4ba
commit
dc21ac2a8c
2 changed files with 11 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue