Browse Source

hide wif prints; auth get -> post

v0.25
pbca26 7 years ago
parent
commit
17385d1676
  1. 6
      routes/shepherd/electrum/auth.js
  2. 6
      routes/shepherd/electrum/keys.js

6
routes/shepherd/electrum/auth.js

@ -1,8 +1,8 @@
module.exports = (shepherd) => {
shepherd.get('/electrum/login', (req, res, next) => {
shepherd.post('/electrum/login', (req, res, next) => {
for (let key in shepherd.electrumServers) {
const _abbr = shepherd.electrumServers[key].abbr;
const { priv, pub } = shepherd.seedToWif(req.query.seed, shepherd.findNetworkObj(_abbr), req.query.iguana);
const { priv, pub } = shepherd.seedToWif(req.body.seed, shepherd.findNetworkObj(_abbr), req.body.iguana);
shepherd.electrumKeys[_abbr] = {
priv,
@ -12,7 +12,7 @@ module.exports = (shepherd) => {
shepherd.electrumCoins.auth = true;
shepherd.log(JSON.stringify(shepherd.electrumKeys, null, '\t'), true);
// shepherd.log(JSON.stringify(shepherd.electrumKeys, null, '\t'), true);
const successObj = {
msg: 'success',

6
routes/shepherd/electrum/keys.js

@ -23,8 +23,8 @@ module.exports = (shepherd) => {
key.compressed = true;
shepherd.log(`seedtowif priv key ${key.privateWif}`, true);
shepherd.log(`seedtowif pub key ${key.publicAddress}`, true);
// shepherd.log(`seedtowif priv key ${key.privateWif}`, true);
// shepherd.log(`seedtowif pub key ${key.publicAddress}`, true);
return {
priv: key.privateWif,
@ -71,7 +71,7 @@ module.exports = (shepherd) => {
_electrumKeys = shepherd.electrumKeys;
}
shepherd.log(JSON.stringify(_electrumKeys, null, '\t'), true);
// shepherd.log(JSON.stringify(_electrumKeys, null, '\t'), true);
const successObj = {
msg: 'success',

Loading…
Cancel
Save