@ -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 )