aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/index.js b/index.js
index b21957ed..fe216875 100644
--- a/index.js
+++ b/index.js
@@ -543,13 +543,14 @@ const authy = new Client({ key: config.authy.key });
}
try {
- await bc.walletPassphrase(config.bitcoin.walletpass, 300);
- l("sending transaction");
+ if (config.bitcoin.walletpass)
+ await bc.walletPassphrase(config.bitcoin.walletpass, 300);
+
let txid = await bc.sendToAddress(
address,
(amount / 100000000).toFixed(8)
);
- l("transaction sent", txid);
+
let txhex = await bc.getRawTransaction(txid);
let tx = bitcoin.Transaction.fromHex(txhex);