Browse Source

create tx spv verification param fix

pkg_automation_electrum
pbca26 7 years ago
parent
commit
6d9bbad052
  1. 13
      routes/shepherd/electrum/createtx.js
  2. 6
      version
  3. 2
      version_build

13
routes/shepherd/electrum/createtx.js

@ -206,7 +206,7 @@ module.exports = (shepherd) => {
shepherd.log('electrum createrawtx =>', true); shepherd.log('electrum createrawtx =>', true);
ecl.connect(); ecl.connect();
shepherd.listunspent(ecl, changeAddress, network, true, true) shepherd.listunspent(ecl, changeAddress, network, true, req.query.verify === 'true' ? true : null)
.then((utxoList) => { .then((utxoList) => {
ecl.close(); ecl.close();
@ -395,6 +395,7 @@ module.exports = (shepherd) => {
value value
); );
} else { } else {
if (!req.query.offline) {
if (network === 'btg' || if (network === 'btg' ||
network === 'bch') { network === 'bch') {
_rawtx = shepherd.buildSignedTxForks( _rawtx = shepherd.buildSignedTxForks(
@ -418,6 +419,7 @@ module.exports = (shepherd) => {
); );
} }
} }
}
if (!push || if (!push ||
push === 'false') { push === 'false') {
@ -586,10 +588,11 @@ module.exports = (shepherd) => {
} }
}); });
shepherd.get('/electrum/pushtx', (req, res, next) => { shepherd.post('/electrum/pushtx', (req, res, next) => {
if (shepherd.checkToken(req.query.token)) { if (shepherd.checkToken(req.body.token)) {
const rawtx = req.query.rawtx; const rawtx = req.body.rawtx;
const ecl = new shepherd.electrumJSCore(shepherd.electrumServers[req.query.network].port, shepherd.electrumServers[req.query.network].address, shepherd.electrumServers[req.query.network].proto); // tcp or tls const _network = req.body.network;
const ecl = new shepherd.electrumJSCore(shepherd.electrumServers[_network].port, shepherd.electrumServers[_network].address, shepherd.electrumServers[_network].proto); // tcp or tls
ecl.connect(); ecl.connect();
ecl.blockchainTransactionBroadcast(rawtx) ecl.blockchainTransactionBroadcast(rawtx)

6
version

@ -1,3 +1,3 @@
version=0.2.0.26d version=0.2.0.27a
type=d-beta type=a-beta
minversion=0.2.0.26 minversion=0.2.0.27

2
version_build

@ -1 +1 @@
0.2.0.26d-beta 0.2.0.27a-beta
Loading…
Cancel
Save