on sent screen show both cashaddr and legacy address for bch
This commit is contained in:
parent
4df7b245a4
commit
f7c95c531e
2 changed files with 14 additions and 5 deletions
|
|
@ -123,13 +123,13 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
||||||
|
|
||||||
if ($scope.wallet.coin == 'bch' && txDate >= cashaddrDate) {
|
if ($scope.wallet.coin == 'bch' && txDate >= cashaddrDate) {
|
||||||
var bchAddresses = bitcoinCashJsService.translateAddresses($scope.btx.addressTo);
|
var bchAddresses = bitcoinCashJsService.translateAddresses($scope.btx.addressTo);
|
||||||
$scope.btx.displayAddress = bchAddresses.cashaddr;
|
$scope.btx.cashAddr = bchAddresses.cashaddr;
|
||||||
$scope.btx.copyAddress = 'bitcoincash:' + $scope.btx.displayAddress;
|
$scope.btx.cashCopyAddr = 'bitcoincash:' + $scope.btx.cashAddr;
|
||||||
} else {
|
|
||||||
$scope.btx.displayAddress = $scope.btx.addressTo;
|
|
||||||
$scope.btx.copyAddress = $scope.btx.displayAddress;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.btx.displayAddress = $scope.btx.addressTo;
|
||||||
|
$scope.btx.copyAddress = $scope.btx.displayAddress;
|
||||||
|
|
||||||
txFormatService.formatAlternativeStr($scope.wallet.coin, tx.fees, function(v) {
|
txFormatService.formatAlternativeStr($scope.wallet.coin, tx.fees, function(v) {
|
||||||
$scope.btx.feeFiatStr = v;
|
$scope.btx.feeFiatStr = v;
|
||||||
$scope.btx.feeRateStr = ($scope.btx.fees / ($scope.btx.amount + $scope.btx.fees) * 100).toFixed(2) + '%';
|
$scope.btx.feeRateStr = ($scope.btx.fees / ($scope.btx.amount + $scope.btx.fees) * 100).toFixed(2) + '%';
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,14 @@
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="item" ng-if="btx.action === 'sent'">
|
<div class="item" ng-if="btx.action === 'sent'">
|
||||||
<span class="label" translate>To</span>
|
<span class="label" translate>To</span>
|
||||||
|
<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>
|
||||||
|
<span class="m15l size-14" ng-if="toName">{{toName}}</span>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
<span class="payment-proposal-to">
|
<span class="payment-proposal-to">
|
||||||
<img ng-if="!cardId" src="img/icon-bitcoin-small.svg">
|
<img ng-if="!cardId" src="img/icon-bitcoin-small.svg">
|
||||||
<img ng-if="cardId" src="img/icon-card.svg" width="34">
|
<img ng-if="cardId" src="img/icon-card.svg" width="34">
|
||||||
|
|
@ -48,6 +56,7 @@
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class="label" ng-if="btx.action === 'sent'" translate>From</span>
|
<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>To</span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue