From 073e4880dce8424628297dfc95a05d062bab682f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 26 Nov 2024 13:07:35 -0800 Subject: tweak fees --- lib/payments.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/payments.ts b/lib/payments.ts index 11cd5eff..df72dbcf 100644 --- a/lib/payments.ts +++ b/lib/payments.ts @@ -527,13 +527,18 @@ export const build = async ({ fees.hourFee = fees.halfHourFee; fees.halfHourFee = fees.fastestFee; - fees.fastestFee = Math.round(fees.fastestFee * 1.1); + + if (type === types.bitcoin) { + fees.fastestFee = Math.round(fees.fastestFee * 1.1); + if (fees.fastestFee === fees.halfHourFee) fees.fastestFee++; + if (fees.hourFee === fees.halfHourFee) fees.hourFee--; + } if (!feeRate) { feeRate = fees.halfHourFee; } - if (feeRate < fees.economyFee) fail("fee rate too low"); + if (feeRate < fees.hourFee) fail("fee rate too low"); const replaceable = false; -- cgit v1.2.3