]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Add Binance Smart Chain (BSC) support
authorMartín Raúl Villalba <martin@martinvillalba.com>
Fri, 25 Sep 2020 15:27:50 +0000 (12:27 -0300)
committerMartín Raúl Villalba <martin@martinvillalba.com>
Fri, 25 Sep 2020 15:27:50 +0000 (12:27 -0300)
src/js/index.js
tests/spec/tests.js

index 252eec1ced72cca6fb04ba09a80898b9713f021c..cd3f7690c709744b54d1d3bb0e4295c767f1532a 100644 (file)
                     || (name == "ESN - Ethersocial Network")
                     || (name == "VET - VeChain")
                     || (name == "ERE - EtherCore")
+                    || (name == "BSC - Binance Smart Chain")
     }
 
     function networkIsRsk() {
                 setHdCoin(183);
             },
         },
+        {
+            name: "BSC - Binance Smart Chain",
+            onSelect: function() {
+                network = libs.bitcoin.networks.bitcoin;
+                setHdCoin(60);
+            },
+        },
         {
             name: "BSV - BitcoinSV",
             onSelect: function() {
index 14cdb8e5a765b307f1d8c81ea5fb4fb875730bf1..73e3087af450402f5e58bbea1aa7bb0f13f9ea91 100644 (file)
@@ -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) {