aboutsummaryrefslogtreecommitdiffstats
path: root/sendLiquid.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-02-29 00:35:29 -0500
committerAdam Soltys <[email protected]>2020-02-29 00:35:29 -0500
commit77158ce5f155b90a67c28489202330cef5efd1f4 (patch)
tree51c9292926d7de7519117b11e2625d4bfc51c405 /sendLiquid.js
parent0b922b0187cb0b3ffa5bdfae3cdb94fa87e1f20c (diff)
parenta620be4d76b567d153b961b18add2626b7789880 (diff)
downloadcoinos-server-77158ce5f155b90a67c28489202330cef5efd1f4.tar.gz
coinos-server-77158ce5f155b90a67c28489202330cef5efd1f4.zip
Merge branch 'master' of https://github.com/asoltys/coinos-server
Diffstat (limited to 'sendLiquid.js')
-rw-r--r--sendLiquid.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/sendLiquid.js b/sendLiquid.js
index 1a218afe..1008f014 100644
--- a/sendLiquid.js
+++ b/sendLiquid.js
@@ -30,6 +30,7 @@ module.exports = (app, db, emit) => async (req, res) => {
fee = parseInt(fee * SATS);
total = amount + fee;
} catch (e) {
+ l("funding failed", e);
return res.status(500).send(e.message);
}
@@ -52,13 +53,13 @@ module.exports = (app, db, emit) => async (req, res) => {
await user.save({ transaction });
});
} catch (e) {
- l(e);
+ l("balance check failed", e);
return res.status(500).send("Not enough satoshis");
}
try {
if (config.liquid.walletpass)
- await bc.walletPassphrase(config.bitcoin.walletpass, 300);
+ await bc.walletPassphrase(config.liquid.walletpass, 300);
rawtx = (await bc.signRawTransactionWithWallet(hex)).hex;
let txid = await bc.sendRawTransaction(rawtx);
@@ -87,7 +88,7 @@ module.exports = (app, db, emit) => async (req, res) => {
res.send(payment);
});
} catch (e) {
- l(e);
+ l("send failed", e);
return res.status(500).send(e.message);
}
};