aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-14 04:49:54 +0000
committerAdam Soltys <[email protected]>2026-03-14 04:49:54 +0000
commitfddfe10f84908c058e239b93985dfe02ba37df04 (patch)
tree563740d528cf7cc2f4ebe5a06a598a40a8cfed1c /lib/payments.ts
parent76f886edde74e8a77d62ecf7caa0b7bd8232a2fe (diff)
downloadcoinos-server-fddfe10f84908c058e239b93985dfe02ba37df04.tar.gz
coinos-server-fddfe10f84908c058e239b93985dfe02ba37df04.zip
slow down ark checksark2
Diffstat (limited to 'lib/payments.ts')
-rw-r--r--lib/payments.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/payments.ts b/lib/payments.ts
index dfbdd3c4..5650dda4 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -1750,12 +1750,11 @@ const freezeCheck = async () => {
await s("ecash:limit", Math.max(lnbalance - lnthreshold, 0));
await s("bolt12:limit", Math.max(lnbalance - lnthreshold, 0));
- try {
- const arkBalance = await getArkBalance();
+ const arkBalance = getArkBalance();
+ if (arkBalance) {
const arkthreshold = (await g("ark:threshold")) || 0;
+ await s("ark:available", arkBalance.available);
await s("ark:limit", Math.max(arkBalance.available - arkthreshold, 0));
- } catch (e) {
- warn("freezeCheck ark balance failed:", e.message);
}
setTimeout(freezeCheck, 10000);