Review Transaction screen now displaying BCH addresses in cashaddr format.
This commit is contained in:
parent
408d46e4d3
commit
be0c18244e
1 changed files with 7 additions and 3 deletions
|
|
@ -403,16 +403,20 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
|
||||||
// Check if the recipient is a contact
|
// Check if the recipient is a contact
|
||||||
addressbookService.get(originCoin + address, function(err, contact) {
|
addressbookService.get(originCoin + address, function(err, contact) {
|
||||||
if (!err && contact) {
|
if (!err && contact) {
|
||||||
handleDestinationAsContact(contact);
|
handleDestinationAsAddressOfContact(contact);
|
||||||
} else {
|
} else {
|
||||||
vm.destination.address = address;
|
if (originCoin === 'bch') {
|
||||||
|
vm.destination.address = bitcoinCashJsService.readAddress(address).cashaddr;
|
||||||
|
} else {
|
||||||
|
vm.destination.address = address;
|
||||||
|
}
|
||||||
vm.destination.kind = 'address';
|
vm.destination.kind = 'address';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDestinationAsContact(contact) {
|
function handleDestinationAsAddressOfContact(contact) {
|
||||||
vm.destination.kind = 'contact';
|
vm.destination.kind = 'contact';
|
||||||
vm.destination.name = contact.name;
|
vm.destination.name = contact.name;
|
||||||
vm.destination.email = contact.email;
|
vm.destination.email = contact.email;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue