aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2019-03-14 11:13:41 +0800
committerHsuan Lee <boczeratul@gmail.com>2019-03-14 11:13:41 +0800
commit6cbd3bc8c22256bf35df5d69d8ef6685590b66e4 (patch)
tree23e67e2939acde581c8c09d1fffc0365a7b3a3cd
parent74762b369e1446cede3db718d0f7348d0f57ab75 (diff)
downloadBIP39-6cbd3bc8c22256bf35df5d69d8ef6685590b66e4.tar.gz
BIP39-6cbd3bc8c22256bf35df5d69d8ef6685590b66e4.tar.zst
BIP39-6cbd3bc8c22256bf35df5d69d8ef6685590b66e4.zip
Add definitions for DEXON (DXN)
-rw-r--r--src/js/index.js10
-rw-r--r--tests/spec/tests.js7
2 files changed, 16 insertions, 1 deletions
diff --git a/src/js/index.js b/src/js/index.js
index 9e955ae..bc15559 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -917,7 +917,8 @@
917 || (networks[DOM.network.val()].name == "MUSIC - Musicoin") 917 || (networks[DOM.network.val()].name == "MUSIC - Musicoin")
918 || (networks[DOM.network.val()].name == "POA - Poa") 918 || (networks[DOM.network.val()].name == "POA - Poa")
919 || (networks[DOM.network.val()].name == "EXP - Expanse") 919 || (networks[DOM.network.val()].name == "EXP - Expanse")
920 || (networks[DOM.network.val()].name == "CLO - Callisto")) { 920 || (networks[DOM.network.val()].name == "CLO - Callisto")
921 || (networks[DOM.network.val()].name == "DXN - DEXON")) {
921 var privKeyBuffer = keyPair.d.toBuffer(32); 922 var privKeyBuffer = keyPair.d.toBuffer(32);
922 privkey = privKeyBuffer.toString('hex'); 923 privkey = privKeyBuffer.toString('hex');
923 var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); 924 var addressBuffer = ethUtil.privateToAddress(privKeyBuffer);
@@ -1921,6 +1922,13 @@
1921 }, 1922 },
1922 }, 1923 },
1923 { 1924 {
1925 name: "DXN - DEXON",
1926 onSelect: function() {
1927 network = bitcoinjs.bitcoin.networks.bitcoin;
1928 setHdCoin(237);
1929 },
1930 },
1931 {
1924 name: "ECN - Ecoin", 1932 name: "ECN - Ecoin",
1925 onSelect: function() { 1933 onSelect: function() {
1926 network = bitcoinjs.bitcoin.networks.ecoin; 1934 network = bitcoinjs.bitcoin.networks.ecoin;
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index ad40b95..e0b1161 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -1404,6 +1404,13 @@ it('Allows selection of BlockStamp', function(done) {
1404 }; 1404 };
1405 testNetwork(done, params); 1405 testNetwork(done, params);
1406}); 1406});
1407it('Allows selection of DEXON', function(done) {
1408 var params = {
1409 selectText: "DXN - DEXON",
1410 firstAddress: "0x136a58788033E028CCd740FbDec6734358DB56Ec",
1411 };
1412 testNetwork(done, params);
1413});
1407 1414
1408// BIP39 seed is set from phrase 1415// BIP39 seed is set from phrase
1409it('Sets the bip39 seed from the prhase', function(done) { 1416it('Sets the bip39 seed from the prhase', function(done) {