From: Martín Raúl Villalba Date: Fri, 25 Sep 2020 15:27:50 +0000 (-0300) Subject: Add Binance Smart Chain (BSC) support X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=995bc58791ddbb59e9b3d0d75c11c1c058e24071 Add Binance Smart Chain (BSC) support --- 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 @@ || (name == "ESN - Ethersocial Network") || (name == "VET - VeChain") || (name == "ERE - EtherCore") + || (name == "BSC - Binance Smart Chain") } function networkIsRsk() { @@ -2232,6 +2233,13 @@ setHdCoin(183); }, }, + { + name: "BSC - Binance Smart Chain", + onSelect: function() { + network = libs.bitcoin.networks.bitcoin; + setHdCoin(60); + }, + }, { name: "BSV - BitcoinSV", onSelect: function() { 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) { }; testNetwork(done, params); }); +it('Allows selection of Binance Smart Chain', function(done) { + var params = { + selectText: "BSC - Binance Smart Chain", + phrase: "abandon abandon ability", + firstAddress: "0xe5815d5902Ad612d49283DEdEc02100Bd44C2772", + firstPubKey: "0x03e723e5b3aa7d72213f01139aa4783e1b34f74e1a04534e3fd8e29bfe2768af8a", + firstPrivKey: "0x8f253078b73d7498302bb78c171b23ce7a8fb511987d2b2702b731638a4a15e7", + }; + testNetwork(done, params); +}); // BIP39 seed is set from phrase it('Sets the bip39 seed from the prhase', function(done) {