aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-03 10:39:33 -0800
committerAdam Soltys <[email protected]>2026-03-03 10:39:33 -0800
commit773907095af3e069da5af9daa5de183586d9584f (patch)
treea1fae2c4e977c5b5095b78c213f92154b2abc8e8 /lib
parentfdce612b18571de36216c1ed12fabd349d4e39e2 (diff)
downloadcoinos-server-773907095af3e069da5af9daa5de183586d9584f.tar.gz
coinos-server-773907095af3e069da5af9daa5de183586d9584f.zip
round fees
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/payments.ts b/lib/payments.ts
index 363fb8ff..057a98ca 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -962,7 +962,6 @@ const buildNonCustodial = async ({ aid, amount, address, feeRate, subtract, user
fees.fastestFee = Math.ceil(fees.fastestFee * 1.5);
if (!feeRate) feeRate = fees.halfHourFee;
- if (feeRate < fees.hourFee) fail("fee rate too low");
const nextIndex = account.nextIndex || 0;
@@ -1020,7 +1019,7 @@ const buildNonCustodial = async ({ aid, amount, address, feeRate, subtract, user
let selected = selectUTXO(utxoInputs, outputs, "default", {
changeAddress,
- feePerByte: BigInt(feeRate),
+ feePerByte: BigInt(Math.ceil(feeRate)),
network: btcNetwork,
createTx: true,
});
@@ -1035,7 +1034,7 @@ const buildNonCustodial = async ({ aid, amount, address, feeRate, subtract, user
const maxOutputs = [{ address, amount: BigInt(amount) }];
selected = selectUTXO(utxoInputs, maxOutputs, "all", {
changeAddress,
- feePerByte: BigInt(feeRate),
+ feePerByte: BigInt(Math.ceil(feeRate)),
network: btcNetwork,
createTx: true,
});