From be0c18244e8be335a62f15788e661eb0fa27b0d3 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 12:12:29 +1200 Subject: [PATCH] Review Transaction screen now displaying BCH addresses in cashaddr format. --- src/js/controllers/review.controller.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 858e115c1..886da26b8 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -403,16 +403,20 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // Check if the recipient is a contact addressbookService.get(originCoin + address, function(err, contact) { if (!err && contact) { - handleDestinationAsContact(contact); + handleDestinationAsAddressOfContact(contact); } else { - vm.destination.address = address; + if (originCoin === 'bch') { + vm.destination.address = bitcoinCashJsService.readAddress(address).cashaddr; + } else { + vm.destination.address = address; + } vm.destination.kind = 'address'; } }); } - function handleDestinationAsContact(contact) { + function handleDestinationAsAddressOfContact(contact) { vm.destination.kind = 'contact'; vm.destination.name = contact.name; vm.destination.email = contact.email;