aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartín Raúl Villalba <martin@martinvillalba.com>2020-09-25 12:27:50 -0300
committerMartín Raúl Villalba <martin@martinvillalba.com>2020-09-25 12:27:50 -0300
commit995bc58791ddbb59e9b3d0d75c11c1c058e24071 (patch)
tree438b03c3ee44200ece5272b1f3ab4ca4199874af
parent920f7aa0785f3d2fb7b08667ea371f349eb4bced (diff)
downloadBIP39-995bc58791ddbb59e9b3d0d75c11c1c058e24071.tar.gz
BIP39-995bc58791ddbb59e9b3d0d75c11c1c058e24071.tar.zst
BIP39-995bc58791ddbb59e9b3d0d75c11c1c058e24071.zip
Add Binance Smart Chain (BSC) support
-rw-r--r--src/js/index.js8
-rw-r--r--tests/spec/tests.js10
2 files changed, 18 insertions, 0 deletions
diff --git a/src/js/index.js b/src/js/index.js
index 252eec1..cd3f769 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -1887,6 +1887,7 @@
1887 || (name == "ESN - Ethersocial Network") 1887 || (name == "ESN - Ethersocial Network")
1888 || (name == "VET - VeChain") 1888 || (name == "VET - VeChain")
1889 || (name == "ERE - EtherCore") 1889 || (name == "ERE - EtherCore")
1890 || (name == "BSC - Binance Smart Chain")
1890 } 1891 }
1891 1892
1892 function networkIsRsk() { 1893 function networkIsRsk() {
@@ -2233,6 +2234,13 @@
2233 }, 2234 },
2234 }, 2235 },
2235 { 2236 {
2237 name: "BSC - Binance Smart Chain",
2238 onSelect: function() {
2239 network = libs.bitcoin.networks.bitcoin;
2240 setHdCoin(60);
2241 },
2242 },
2243 {
2236 name: "BSV - BitcoinSV", 2244 name: "BSV - BitcoinSV",
2237 onSelect: function() { 2245 onSelect: function() {
2238 network = libs.bitcoin.networks.bitcoinsv; 2246 network = libs.bitcoin.networks.bitcoinsv;
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 14cdb8e..73e3087 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -2275,6 +2275,16 @@ it('Allows selection of Scribe', function(done) {
2275 }; 2275 };
2276 testNetwork(done, params); 2276 testNetwork(done, params);
2277}); 2277});
2278it('Allows selection of Binance Smart Chain', function(done) {
2279 var params = {
2280 selectText: "BSC - Binance Smart Chain",
2281 phrase: "abandon abandon ability",
2282 firstAddress: "0xe5815d5902Ad612d49283DEdEc02100Bd44C2772",
2283 firstPubKey: "0x03e723e5b3aa7d72213f01139aa4783e1b34f74e1a04534e3fd8e29bfe2768af8a",
2284 firstPrivKey: "0x8f253078b73d7498302bb78c171b23ce7a8fb511987d2b2702b731638a4a15e7",
2285 };
2286 testNetwork(done, params);
2287});
2278 2288
2279// BIP39 seed is set from phrase 2289// BIP39 seed is set from phrase
2280it('Sets the bip39 seed from the prhase', function(done) { 2290it('Sets the bip39 seed from the prhase', function(done) {