diff --git a/src/js/controllers/tx-details.js b/src/js/controllers/tx-details.js index f3c15b582..a5b32499a 100644 --- a/src/js/controllers/tx-details.js +++ b/src/js/controllers/tx-details.js @@ -117,6 +117,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio } $scope.btx = txFormatService.processTx($scope.wallet.coin, tx); + $scope.addressDisplayType = 'legacy'; var cashaddrDate = new Date(2018, 0, 15); var txDate = new Date(($scope.btx.createdOn || $scope.btx.time) * 1000); @@ -132,6 +133,9 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio o.cashAddr = bchAddresses.cashaddr; }); } + + $scope.canToggleAddressType = true; + $scope.addressDisplayType = 'cashAddr'; } $scope.btx.displayAddress = $scope.btx.addressTo; @@ -245,4 +249,8 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio } }; + $scope.displayAddress = function(type) { + $scope.addressDisplayType = type; + } + }); diff --git a/src/sass/views/includes/txp-details.scss b/src/sass/views/includes/txp-details.scss index 3c72898c3..0549bef6f 100644 --- a/src/sass/views/includes/txp-details.scss +++ b/src/sass/views/includes/txp-details.scss @@ -283,4 +283,11 @@ font-size: 12px; color: $v-mid-gray; } + .button-address { + margin-top: 10px; + background: transparent; + border: none; + font-size: 12px; + color: $v-text-accent-color; + } } diff --git a/www/views/tx-details.html b/www/views/tx-details.html index 1b67bb63a..fc3b729fc 100644 --- a/www/views/tx-details.html +++ b/www/views/tx-details.html @@ -39,7 +39,7 @@