aboutsummaryrefslogtreecommitdiff
path: root/src/js/index.js
diff options
context:
space:
mode:
authorhostgame <hostgame@users.noreply.github.com>2019-04-03 17:09:41 +0600
committerhostgame <hostgame@users.noreply.github.com>2019-04-03 17:09:41 +0600
commit491948dbcb6bee740158037a8aefe5096becb76e (patch)
treefd96db200002a1479cbac7a0562ff5398e1b7fdd /src/js/index.js
parent7a11300336844b822a8f3ec4f85586b79c5954f4 (diff)
downloadBIP39-491948dbcb6bee740158037a8aefe5096becb76e.tar.gz
BIP39-491948dbcb6bee740158037a8aefe5096becb76e.tar.zst
BIP39-491948dbcb6bee740158037a8aefe5096becb76e.zip
Nebulas. Add test spec. Replace nebulas.js by account part of nebulas.js only.
Diffstat (limited to 'src/js/index.js')
-rw-r--r--src/js/index.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/js/index.js b/src/js/index.js
index 8699733..8c23e61 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -929,17 +929,13 @@
929 pubkey = ethUtil.addHexPrefix(pubkey); 929 pubkey = ethUtil.addHexPrefix(pubkey);
930 } 930 }
931 if ((networks[DOM.network.val()].name == "NAS - Nebulas")) { 931 if ((networks[DOM.network.val()].name == "NAS - Nebulas")) {
932 var NasAccount = require("nebulas").Account; 932 var NasAccount = require("nebulas-account");
933 var privKeyBuffer = keyPair.d.toBuffer(32); 933 var privKeyBuffer = keyPair.d.toBuffer(32);
934 // privkey = privKeyBuffer.toString('hex'); 934 var nebulasAccount = new NasAccount();
935 console.log(privkey); 935 nebulasAccount.setPrivateKey(privKeyBuffer);
936 var nasAccount = NasAccount.NewAccount(privKeyBuffer); 936 address = nebulasAccount.getAddressString();
937 // var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); 937 privkey = nebulasAccount.getPrivateKeyString();
938 // var hexAddress = addressBuffer.toString('hex'); 938 pubkey = nebulasAccount.getPublicKeyString();
939 // var checksumAddress = ethUtil.toChecksumAddress(hexAddress);
940 address = nasAccount.getAddressString();
941 privkey = nasAccount.getPrivateKeyString();
942 pubkey = nasAccount.getPublicKeyString();
943 } 939 }
944 // Ripple values are different 940 // Ripple values are different
945 if (networks[DOM.network.val()].name == "XRP - Ripple") { 941 if (networks[DOM.network.val()].name == "XRP - Ripple") {