diff options
| author | Adam Soltys <[email protected]> | 2024-12-05 11:31:54 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-12-05 11:31:54 -0800 |
| commit | 28d8f1e5e6e28cc395bf08bb1950e8ed742ea0b5 (patch) | |
| tree | 14a5e03fcb09e98981a3f0c2d253ff214e3c3432 /lib/payments.ts | |
| parent | b9845b1f945dd011a4e12c748bc7d6a75bdd7386 (diff) | |
| download | coinos-server-28d8f1e5e6e28cc395bf08bb1950e8ed742ea0b5.tar.gz coinos-server-28d8f1e5e6e28cc395bf08bb1950e8ed742ea0b5.zip | |
hardcode liquid fees
Diffstat (limited to 'lib/payments.ts')
| -rw-r--r-- | lib/payments.ts | 9 |
1 files 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); } } |
