new Crown address format. May not be elegant solution, but bitcoinjs has limitation of network prefix length and I don't want to modify it. This approach is isolated and does not affect others

This commit is contained in:
Pawel Cioch
2019-04-16 23:17:16 -05:00
parent 30d6779baa
commit bf13c95fb0
3 changed files with 41 additions and 2 deletions

View File

@@ -977,6 +977,11 @@
address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network)
}
}
if ((networks[DOM.network.val()].name == "CRW - Crown")) {
address = bitcoinjs.bitcoin.networks.crown.toNewAddress(address);
}
addAddressToList(indexText, address, pubkey, privkey);
if (isLast) {
hidePending();
@@ -1874,6 +1879,13 @@
setHdCoin(186);
},
},
{
name: "CRW - Crown (Legacy)",
onSelect: function() {
network = bitcoinjs.bitcoin.networks.crown;
setHdCoin(72);
},
},
{
name: "CRW - Crown",
onSelect: function() {