diff options
| author | Adam Soltys <[email protected]> | 2019-09-10 21:13:04 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2019-09-10 21:13:04 -0700 |
| commit | a112275c518ccafe714562c79a28a0cae7ce4500 (patch) | |
| tree | a1a566d9f7bba7e88e7d24b9c326cefa48e3df37 | |
| parent | 5288a40fffd926b102de4ff833b3abdb6a493fa2 (diff) | |
| download | coinos-server-a112275c518ccafe714562c79a28a0cae7ce4500.tar.gz coinos-server-a112275c518ccafe714562c79a28a0cae7ce4500.zip | |
check for passphrase
| -rw-r--r-- | index.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |
