From 7384ad3e6312299dcda8854fe0ae3a124e4cff82 Mon Sep 17 00:00:00 2001 From: Kadir Sekha Date: Wed, 31 Jan 2018 11:28:52 -0400 Subject: [PATCH] if received then show addresses received at --- src/js/controllers/tx-details.js | 14 +++++++++++--- www/views/tx-details.html | 22 +++++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/js/controllers/tx-details.js b/src/js/controllers/tx-details.js index 4c00de15f..ba3a4a569 100644 --- a/src/js/controllers/tx-details.js +++ b/src/js/controllers/tx-details.js @@ -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; diff --git a/www/views/tx-details.html b/www/views/tx-details.html index bd727434f..1b67bb63a 100644 --- a/www/views/tx-details.html +++ b/www/views/tx-details.html @@ -42,8 +42,8 @@ -
- +
+ {{toName}}
@@ -59,11 +59,27 @@
From - To + Received To
{{wallet.name}}
+
+ + + +
+ +
+
+ + + +
+ +
+
+
Created by