on sent screen show both cashaddr and legacy address for bch

This commit is contained in:
Kadir Sekha 2018-01-31 11:03:18 -04:00
commit f7c95c531e
2 changed files with 14 additions and 5 deletions

View file

@ -123,13 +123,13 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
if ($scope.wallet.coin == 'bch' && txDate >= cashaddrDate) {
var bchAddresses = bitcoinCashJsService.translateAddresses($scope.btx.addressTo);
$scope.btx.displayAddress = bchAddresses.cashaddr;
$scope.btx.copyAddress = 'bitcoincash:' + $scope.btx.displayAddress;
} else {
$scope.btx.displayAddress = $scope.btx.addressTo;
$scope.btx.copyAddress = $scope.btx.displayAddress;
$scope.btx.cashAddr = bchAddresses.cashaddr;
$scope.btx.cashCopyAddr = 'bitcoincash:' + $scope.btx.cashAddr;
}
$scope.btx.displayAddress = $scope.btx.addressTo;
$scope.btx.copyAddress = $scope.btx.displayAddress;
txFormatService.formatAlternativeStr($scope.wallet.coin, tx.fees, function(v) {
$scope.btx.feeFiatStr = v;
$scope.btx.feeRateStr = ($scope.btx.fees / ($scope.btx.amount + $scope.btx.fees) * 100).toFixed(2) + '%';