mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-06 02:43:49 +00:00
Add CRW - Crown
This commit is contained in:
@@ -19902,6 +19902,16 @@ bitcoin.networks.clam = {
|
||||
wif: 0x85,
|
||||
};
|
||||
|
||||
bitcoin.networks.crown = {
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x00,
|
||||
scriptHash: 0x05,
|
||||
wif: 0x80,
|
||||
};
|
||||
|
||||
bitcoin.networks.dash = {
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
@@ -44811,6 +44821,13 @@ window.Entropy = new (function() {
|
||||
DOM.bip44coin.val(23);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "CRW - Crown",
|
||||
onSelect: function() {
|
||||
network = bitcoin.networks.crown;
|
||||
DOM.bip44coin.val(72);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Dogecoin",
|
||||
onSelect: function() {
|
||||
|
||||
@@ -35,6 +35,16 @@ bitcoin.networks.clam = {
|
||||
wif: 0x85,
|
||||
};
|
||||
|
||||
bitcoin.networks.crown = {
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x00,
|
||||
scriptHash: 0x05,
|
||||
wif: 0x80,
|
||||
};
|
||||
|
||||
bitcoin.networks.dash = {
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
|
||||
@@ -1077,6 +1077,13 @@
|
||||
DOM.bip44coin.val(23);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "CRW - Crown",
|
||||
onSelect: function() {
|
||||
network = bitcoin.networks.crown;
|
||||
DOM.bip44coin.val(72);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Dogecoin",
|
||||
onSelect: function() {
|
||||
|
||||
30
tests.js
30
tests.js
@@ -571,6 +571,36 @@ page.open(url, function(status) {
|
||||
});
|
||||
},
|
||||
|
||||
// Network can be set to crown
|
||||
function() {
|
||||
page.open(url, function(status) {
|
||||
// set the phrase and coin
|
||||
var expected = "18pWSwSUAQdiwMHUfFZB1fM2xue9X1FqE5";
|
||||
page.evaluate(function() {
|
||||
$(".phrase").val("abandon abandon ability");
|
||||
$(".phrase").trigger("input");
|
||||
$(".network option[selected]").removeAttr("selected");
|
||||
$(".network option").filter(function() {
|
||||
return $(this).html() == "CRW - Crown";
|
||||
}).prop("selected", true);
|
||||
$(".network").trigger("change");
|
||||
});
|
||||
// check the address is generated correctly
|
||||
waitForGenerate(function() {
|
||||
var actual = page.evaluate(function() {
|
||||
return $(".address:first").text();
|
||||
});
|
||||
if (actual != expected) {
|
||||
console.log("CRW address is incorrect");
|
||||
console.log("Expected: " + expected);
|
||||
console.log("Actual: " + actual);
|
||||
fail();
|
||||
}
|
||||
next();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// Network can be set to dash
|
||||
function() {
|
||||
page.open(url, function(status) {
|
||||
|
||||
Reference in New Issue
Block a user