diff options
author | iancoleman <1281387+iancoleman@users.noreply.github.com> | 2020-10-02 11:25:17 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 11:25:17 +1000 |
commit | 42e00ef56a00c304090c54ef05ff1fc0dcb148b6 (patch) | |
tree | af7707b6885c06794179a7041828a9b3ceccb87c | |
parent | 8dbf7d5837949c56c3c2824cd5382068e439af17 (diff) | |
parent | 995bc58791ddbb59e9b3d0d75c11c1c058e24071 (diff) | |
download | BIP39-42e00ef56a00c304090c54ef05ff1fc0dcb148b6.tar.gz BIP39-42e00ef56a00c304090c54ef05ff1fc0dcb148b6.tar.zst BIP39-42e00ef56a00c304090c54ef05ff1fc0dcb148b6.zip |
Merge pull request #442 from mvillalba/master
Add Binance Smart Chain (BSC) support
-rw-r--r-- | src/js/index.js | 8 | ||||
-rw-r--r-- | tests/spec/tests.js | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/js/index.js b/src/js/index.js index b070006..dc24963 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 92df64a..58318db 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 | }); |
2278 | it('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 |
2280 | it('Sets the bip39 seed from the prhase', function(done) { | 2290 | it('Sets the bip39 seed from the prhase', function(done) { |