From 16afe3ecbf87ef4cb2ae52f1d43f1af733c1ec78 Mon Sep 17 00:00:00 2001 From: hackyminer Date: Thu, 12 Jul 2018 20:32:10 +0900 Subject: add Ethersocial Network(ESN) support --- src/js/index.js | 12 +++++++++++- tests/spec/tests.js | 7 +++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/js/index.js b/src/js/index.js index 8262947..67dde1c 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -918,7 +918,9 @@ || (networks[DOM.network.val()].name == "POA - Poa") || (networks[DOM.network.val()].name == "EXP - Expanse") || (networks[DOM.network.val()].name == "CLO - Callisto") - || (networks[DOM.network.val()].name == "DXN - DEXON")) { + || (networks[DOM.network.val()].name == "DXN - DEXON") + || (networks[DOM.network.val()].name == "ESN - Ethersocial Network") + ) { var privKeyBuffer = keyPair.d.toBuffer(32); privkey = privKeyBuffer.toString('hex'); var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); @@ -1991,6 +1993,14 @@ setHdCoin(151); }, }, + { + name: "ESN - Ethersocial Network", + segwitAvailable: false, + onSelect: function() { + network = bitcoinjs.bitcoin.networks.bitcoin; + setHdCoin(31102); + }, + }, { name: "ETC - Ethereum Classic", segwitAvailable: false, diff --git a/tests/spec/tests.js b/tests/spec/tests.js index a22d749..83fc949 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -1434,6 +1434,13 @@ it('Allows selection of DEXON', function(done) { }; testNetwork(done, params); }); +it('Allows selection of Ethersocial Network', function(done) { + var params = { + selectText: "ESN - Ethersocial Network", + firstAddress: "0x6EE99Be2A0C7F887a71e21C8608ACF0aa0D2b767", + }; + testNetwork(done, params); +}); // BIP39 seed is set from phrase it('Sets the bip39 seed from the prhase', function(done) { -- cgit v1.2.3