From 13a1e1b1db2b24bc3d1d74681734307c05acf69c Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Thu, 13 May 2021 10:23:01 -0700 Subject: [PATCH] fix(send tx): Fixing bug in the sendTxOptions() --- src/routes/v4/full-node/rawtransactions.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/routes/v4/full-node/rawtransactions.js b/src/routes/v4/full-node/rawtransactions.js index 1fcf84c..5bce14e 100644 --- a/src/routes/v4/full-node/rawtransactions.js +++ b/src/routes/v4/full-node/rawtransactions.js @@ -568,11 +568,14 @@ class RawTransactions { // accidental double spends can be reduced. sendTxOptions (options) { try { - if (process.env.RPC_SENDURL) { - console.log(`original options: ${JSON.stringify(options, null, 2)}`) + const sendUrl = process.env.RPC_SENDURL + + if (sendUrl !== 'undefined' && sendUrl !== undefined) { + // console.log(`original options: ${JSON.stringify(options, null, 2)}`) + options.baseURL = process.env.RPC_SENDURL - console.log(`modified options: ${JSON.stringify(options, null, 2)}`) + // console.log(`modified options: ${JSON.stringify(options, null, 2)}`) } return options