Merge pull request #65 from mikeyb/game

Add GAME support
This commit is contained in:
iancoleman
2017-04-28 09:16:29 +10:00
committed by GitHub
4 changed files with 64 additions and 0 deletions

View File

@@ -17896,6 +17896,16 @@ bitcoin.networks.dash = {
wif: 0xcc,
};
bitcoin.networks.game = {
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x26,
scriptHash: 0x05,
wif: 0xa6,
};
bitcoin.networks.namecoin = {
bip32: {
public: 0x0488b21e,
@@ -42780,6 +42790,13 @@ window.Entropy = new (function() {
DOM.bip44coin.val(60);
},
},
{
name: "GAME",
onSelect: function() {
network = bitcoin.networks.game;
DOM.bip44coin.val(101);
},
},
{
name: "Jumbucks",
onSelect: function() {

View File

@@ -45,6 +45,16 @@ bitcoin.networks.dash = {
wif: 0xcc,
};
bitcoin.networks.game = {
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x26,
scriptHash: 0x05,
wif: 0xa6,
};
bitcoin.networks.namecoin = {
bip32: {
public: 0x0488b21e,

View File

@@ -1113,6 +1113,13 @@
DOM.bip44coin.val(60);
},
},
{
name: "GAME",
onSelect: function() {
network = bitcoin.networks.game;
DOM.bip44coin.val(101);
},
},
{
name: "Jumbucks",
onSelect: function() {

View File

@@ -571,6 +571,36 @@ page.open(url, function(status) {
});
},
// Network can be set to game
function() {
page.open(url, function(status) {
// set the phrase and coin
var expected = "GSMY9bAp36cMR4zyT4uGVS7GFjpdXbao5Q";
page.evaluate(function() {
$(".phrase").val("abandon abandon ability");
$(".phrase").trigger("input");
$(".network option[selected]").removeAttr("selected");
$(".network option").filter(function() {
return $(this).html() == "GAME";
}).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("GAME address is incorrect");
console.log("Expected: " + expected);
console.log("Actual: " + actual);
fail();
}
next();
});
});
},
// Network can be set to namecoin
function() {
page.open(url, function(status) {