aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/buildliquidtx.js3
-rw-r--r--lib/buildtx.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/buildliquidtx.js b/lib/buildliquidtx.js
index aafaf049..cc1c3f10 100644
--- a/lib/buildliquidtx.js
+++ b/lib/buildliquidtx.js
@@ -22,6 +22,7 @@ module.exports = async ({ address, asset, amount, feeRate, user }) => {
where: {
received: true,
account_id: user.account_id,
+ network: 'LBTC',
},
});
@@ -36,7 +37,7 @@ module.exports = async ({ address, asset, amount, feeRate, user }) => {
}
let feeInput = utxos.find((utxo) => utxo.asset === btc && utxo.value > 1000);
- if (!feeInput) throw new Error("Couldn't find fee input");
+ if (!feeInput) throw new Error("Insufficient balance, couldn't find an input to cover the fee");
utxos = utxos.filter((utxo) => utxo.asset === asset);
diff --git a/lib/buildtx.js b/lib/buildtx.js
index 56b4bbff..8c8be959 100644
--- a/lib/buildtx.js
+++ b/lib/buildtx.js
@@ -16,6 +16,7 @@ module.exports = async ({ address, amount, feeRate, user }) => {
where: {
received: true,
account_id: user.account_id,
+ network: 'BTC',
}
});
@@ -35,7 +36,6 @@ module.exports = async ({ address, amount, feeRate, user }) => {
}
];
- debugger
let { inputs, outputs, fee } = coinselect(utxos, targets, feeRate);
if (!inputs || !outputs) {