From c239aa5714949a4da9a3d9db29711819d0437b93 Mon Sep 17 00:00:00 2001 From: Kadir Sekha Date: Wed, 31 Jan 2018 12:23:44 -0400 Subject: [PATCH] have address type toggle on send and receive for bch --- src/js/controllers/tx-details.js | 8 ++++++++ src/sass/views/includes/txp-details.scss | 7 +++++++ www/views/tx-details.html | 20 ++++++++++++++++---- 3 files changed, 31 insertions(+), 4 deletions(-) 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 @@
To - +
@@ -47,7 +47,7 @@ {{toName}}
- +
@@ -55,6 +55,12 @@ {{toName}}
+ +
@@ -65,20 +71,26 @@
{{wallet.name}}
- +
- +
+ +