]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Merge pull request #341 from Cryptarchist/support_wagerr
authoriancoleman <1281387+iancoleman@users.noreply.github.com>
Thu, 1 Aug 2019 00:00:06 +0000 (10:00 +1000)
committerGitHub <noreply@github.com>
Thu, 1 Aug 2019 00:00:06 +0000 (10:00 +1000)
Add support for Wagerr

1  2 
src/js/index.js
tests/spec/tests.js

diff --combined src/js/index.js
index 52b0db5d86f4f8ba3ea49dceaaaae6e5f6cbcc0c,19c9b84b11e3b8f51060161de9210026e283341e..544e67d19e1ba31b1120cc45364796daae01b108
                      || (networks[DOM.network.val()].name == "DXN - DEXON")
                      || (networks[DOM.network.val()].name == "ELLA - Ellaism")
                      || (networks[DOM.network.val()].name == "ESN - Ethersocial Network")
 +                    || (networks[DOM.network.val()].name == "VET - VeChain")
                  ) {
                      var privKeyBuffer = keyPair.d.toBuffer(32);
                      privkey = privKeyBuffer.toString('hex');
                  setHdCoin(33);
              },
          },
 +        {
 +            name: "VET - VeChain",
 +            onSelect: function() {
 +                network = bitcoinjs.bitcoin.networks.bitcoin;
 +                setHdCoin(818);
 +            },
 +        },
          {
              name: "VIA - Viacoin",
              onSelect: function() {
                  setHdCoin(28);
              },
          },
+         {
+             name: "WGR - Wagerr",
+             onSelect: function() {
+                 network = bitcoinjs.bitcoin.networks.wagerr;
+                 setHdCoin(7825266);
+             },
+         },
          {
              name: "WC - Wincoin",
              onSelect: function() {
diff --combined tests/spec/tests.js
index dd90a667fc57bdbe642f7eb1bcc5174ec89f66c2,0634c8fe952695d2e3a0445ab5578624726f33b4..5e65714c96957a42d7582517a9a5e33cbcd4677f
@@@ -1319,13 -1319,6 +1319,13 @@@ it('Allows selection of Vpncoin', funct
      };
      testNetwork(done, params);
  });
 +it('Allows selection of VeChain', function(done) {
 +    var params = {
 +        selectText: "VET - VeChain",
 +        firstAddress: "0xdba55B1B6070f3a733D5eDFf35F0da4A00E455F2",
 +    };
 +    testNetwork(done, params);
 +});
  it('Allows selection of Whitecoin', function(done) {
      var params = {
          selectText: "XWC - Whitecoin",
@@@ -1536,6 -1529,13 +1536,13 @@@ it('Allows selection of Stellar', funct
      };
      testNetwork(done, params);
  });
+ it('Allows selection of Wagerr', function(done) {
+     var params = {
+         selectText: "WGR - Wagerr",
+         firstAddress: "WYiVgQU39VcQxcnacoCiaZHZZLjDCJoS95",
+     };
+     testNetwork(done, params);
+ });
  
  // BIP39 seed is set from phrase
  it('Sets the bip39 seed from the prhase', function(done) {