if received then show addresses received at
This commit is contained in:
parent
f7c95c531e
commit
7384ad3e63
2 changed files with 30 additions and 6 deletions
|
|
@ -122,9 +122,17 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
var txDate = new Date(($scope.btx.createdOn || $scope.btx.time) * 1000);
|
||||
|
||||
if ($scope.wallet.coin == 'bch' && txDate >= cashaddrDate) {
|
||||
var bchAddresses = bitcoinCashJsService.translateAddresses($scope.btx.addressTo);
|
||||
$scope.btx.cashAddr = bchAddresses.cashaddr;
|
||||
$scope.btx.cashCopyAddr = 'bitcoincash:' + $scope.btx.cashAddr;
|
||||
if ($scope.btx.action === 'sent') {
|
||||
var bchAddresses = bitcoinCashJsService.translateAddresses($scope.btx.addressTo);
|
||||
$scope.btx.cashAddr = bchAddresses.cashaddr;
|
||||
$scope.btx.cashCopyAddr = 'bitcoincash:' + $scope.btx.cashAddr;
|
||||
} else {
|
||||
lodash.each($scope.btx.outputs, function(o) {
|
||||
var bchAddresses = bitcoinCashJsService.translateAddresses(o.address);
|
||||
o.cashAddr = bchAddresses.cashaddr;
|
||||
});
|
||||
console.log($scope.btx.outputs);
|
||||
}
|
||||
}
|
||||
|
||||
$scope.btx.displayAddress = $scope.btx.addressTo;
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@
|
|||
<span ng-if="btx.cashAddr" class="payment-proposal-to">
|
||||
<img ng-if="!cardId" src="img/icon-bitcoin-small.svg">
|
||||
<img ng-if="cardId" src="img/icon-card.svg" width="34">
|
||||
<div copy-to-clipboard="btx.cashCopyAddr" class="elipsis">
|
||||
<contact ng-if="!toName" address="{{btx.cashAddr}}" class="elipsis" style="display: block;"></contact>
|
||||
<div copy-to-clipboard="btx.cashCopyAddr" class="ellipsis">
|
||||
<contact ng-if="!toName" address="{{btx.cashAddr}}" class="ellipsis" style="display: block;"></contact>
|
||||
<span class="m15l size-14" ng-if="toName">{{toName}}</span>
|
||||
</div>
|
||||
</span>
|
||||
|
|
@ -59,11 +59,27 @@
|
|||
|
||||
<div class="item">
|
||||
<span class="label" ng-if="btx.action === 'sent'" translate>From</span>
|
||||
<span class="label" ng-if="btx.action !== 'sent'" translate>To</span>
|
||||
<span class="label" ng-if="btx.action !== 'sent'" translate>Received To</span>
|
||||
<div class="wallet">
|
||||
<i class="icon big-icon-svg" ng-include="'views/includes/walletIcon.html'"></i>
|
||||
<div>{{wallet.name}}</div>
|
||||
</div>
|
||||
<div ng-if="btx.action === 'received' || btx.action === 'moved'">
|
||||
<span ng-repeat="o in btx.outputs" ng-if="o.cashAddr" class="payment-proposal-to">
|
||||
<img ng-if="!cardId" src="img/icon-bitcoin-small.svg">
|
||||
<img ng-if="cardId" src="img/icon-card.svg" width="34">
|
||||
<div copy-to-clipboard="'bitcoincash:' + o.cashAddr" class="ellipsis">
|
||||
<contact address="{{o.cashAddr}}" class="ellipsis" style="display: block;"></contact>
|
||||
</div>
|
||||
</span>
|
||||
<span ng-repeat="o in btx.outputs" class="payment-proposal-to">
|
||||
<img ng-if="!cardId" src="img/icon-bitcoin-small.svg">
|
||||
<img ng-if="cardId" src="img/icon-card.svg" width="34">
|
||||
<div copy-to-clipboard="o.address" class="ellipsis">
|
||||
<contact address="{{o.address}}" class="ellipsis" style="display: block;"></contact>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item single-line" ng-if="btx.action != 'received' && isShared">
|
||||
<span class="label" translate>Created by</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue