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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,8 +161,7 @@
|
|||
<span class="ellipsis">
|
||||
<div ng-if="btx.message">{{btx.message}}</div>
|
||||
<div ng-if="!btx.message && btx.note.body">{{btx.note.body}}</div>
|
||||
<div ng-if="!btx.message && !btx.note.body && wallet.addressbook[btx.addressTo]">{{wallet.addressbook[btx.addressTo]}}</div>
|
||||
<div ng-if="!btx.message && !btx.note.body && !wallet.addressbook[btx.addressTo]" translate> Sent</div>
|
||||
<contact ng-if="!btx.message && !btx.note.body" class="ellipsis" address="{{btx.addressTo}}" label="'Sent'"></contact>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue