aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-03-11 22:28:16 -0700
committerAdam Soltys <[email protected]>2020-03-11 22:28:16 -0700
commited7ddf44fb5a8c99dbbba48ac019d5ff59316175 (patch)
treecc3e04004d08e5ef6fcca7cefe9ad786695f30d3
parenta22b5cd3769ea6d7aac4f34acf142534ee75491c (diff)
downloadcoinos-server-ed7ddf44fb5a8c99dbbba48ac019d5ff59316175.tar.gz
coinos-server-ed7ddf44fb5a8c99dbbba48ac019d5ff59316175.zip
use liquid daemon
-rw-r--r--routes/liquid/send.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/routes/liquid/send.js b/routes/liquid/send.js
index 83c5dc22..5c812eaf 100644
--- a/routes/liquid/send.js
+++ b/routes/liquid/send.js
@@ -8,12 +8,12 @@ module.exports = async (req, res) => {
} = req.body;
const isChange = async address =>
- !((await bc.getAddressInfo(address)).ismine) ||
+ !((await lq.getAddressInfo(address)).ismine) ||
!Object.keys(addresses).includes(address) ||
address === user.liquid;
- const unblinded = await bc.unblindRawTransaction(hex);
- tx = await bc.decodeRawTransaction(unblinded.hex);
+ const unblinded = await lq.unblindRawTransaction(hex);
+ tx = await lq.decodeRawTransaction(unblinded.hex);
let total = 0;
let change = 0;
@@ -59,11 +59,11 @@ module.exports = async (req, res) => {
try {
if (config.liquid.walletpass)
- await bc.walletPassphrase(config.liquid.walletpass, 300);
+ await lq.walletPassphrase(config.liquid.walletpass, 300);
- hex = await bc.blindRawTransaction(hex);
- rawtx = (await bc.signRawTransactionWithWallet(hex)).hex;
- let txid = await bc.sendRawTransaction(rawtx);
+ hex = await lq.blindRawTransaction(hex);
+ rawtx = (await lq.signRawTransactionWithWallet(hex)).hex;
+ let txid = await lq.sendRawTransaction(rawtx);
await db.transaction(async transaction => {
await user.save({ transaction });