From 28d8f1e5e6e28cc395bf08bb1950e8ed742ea0b5 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 5 Dec 2024 11:31:54 -0800 Subject: hardcode liquid fees --- lib/payments.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/payments.ts b/lib/payments.ts index d9808f3a..93afc9ea 100644 --- a/lib/payments.ts +++ b/lib/payments.ts @@ -566,9 +566,10 @@ export const build = async ({ amount = parseInt(amount); if (amount < 0) fail("invalid amount"); - const fees: any = await fetch(`${api[type]}/fees/recommended`).then((r) => - r.json(), - ); + const fees: any = + type === types.liquid + ? { fastestFee: 0.1, halfHourFee: 0.1, hourFee: 0.1 } + : await fetch(`${api[type]}/fees/recommended`).then((r) => r.json()); fees.hourFee = fees.halfHourFee; fees.halfHourFee = fees.fastestFee; @@ -761,7 +762,7 @@ export const check = async () => { try { if (completed) await finalize(completed, p); else if (failed) await reverse(p); - } catch(e) { + } catch (e) { err("failed to finalize", p.id, e.message); } } -- cgit v1.2.3