From 6cbd3bc8c22256bf35df5d69d8ef6685590b66e4 Mon Sep 17 00:00:00 2001 From: Hsuan Lee Date: Thu, 14 Mar 2019 11:13:41 +0800 Subject: Add definitions for DEXON (DXN) --- src/js/index.js | 10 +++++++++- tests/spec/tests.js | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) 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 @@ || (networks[DOM.network.val()].name == "MUSIC - Musicoin") || (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 == "CLO - Callisto") + || (networks[DOM.network.val()].name == "DXN - DEXON")) { var privKeyBuffer = keyPair.d.toBuffer(32); privkey = privKeyBuffer.toString('hex'); var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); @@ -1920,6 +1921,13 @@ setHdCoin(3); }, }, + { + name: "DXN - DEXON", + onSelect: function() { + network = bitcoinjs.bitcoin.networks.bitcoin; + setHdCoin(237); + }, + }, { name: "ECN - Ecoin", onSelect: function() { 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) { }; testNetwork(done, params); }); +it('Allows selection of DEXON', function(done) { + var params = { + selectText: "DXN - DEXON", + firstAddress: "0x136a58788033E028CCd740FbDec6734358DB56Ec", + }; + testNetwork(done, params); +}); // BIP39 seed is set from phrase it('Sets the bip39 seed from the prhase', function(done) { -- cgit v1.2.3