Browse Source

spv get keys get -> post

v0.25
pbca26 7 years ago
parent
commit
ac5978c0e1
  1. 6
      routes/shepherd/electrum/keys.js

6
routes/shepherd/electrum/keys.js

@ -45,13 +45,13 @@ module.exports = (shepherd) => {
res.end(JSON.stringify(successObj));
});
shepherd.get('/electrum/keys', (req, res, next) => {
shepherd.post('/electrum/keys', (req, res, next) => {
let _matchingKeyPairs = 0;
let _electrumKeys = {};
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);
if (shepherd.electrumKeys[_abbr].pub === pub &&
shepherd.electrumKeys[_abbr].priv === priv) {
@ -59,7 +59,7 @@ module.exports = (shepherd) => {
}
}
if (req.query.active) {
if (req.body.active) {
_electrumKeys = JSON.parse(JSON.stringify(shepherd.electrumKeys));
for (let key in _electrumKeys) {

Loading…
Cancel
Save