Skip to content

Release: develop -> main#3469

Merged
TaprootFreak merged 4 commits intomainfrom
develop
Mar 19, 2026
Merged

Release: develop -> main#3469
TaprootFreak merged 4 commits intomainfrom
develop

Conversation

@github-actions
Copy link

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

#3468)

* fix: add timeout to blockchain balance updates to prevent hanging cron

A hanging RPC call (e.g. Firo) would store a never-resolving promise in
the updateCalls cache. Subsequent cron runs reused that same promise,
permanently blocking checkLiquidityBalances for all providers. This
caused all liquidity balances (Olkypay, Yapeal, exchanges, blockchains)
to go stale.

Wrap the stored promise with a 30s timeout so hanging calls get rejected
and the cache entry is cleaned up.

* fix: consolidate cleanup to prevent race condition

Move updateCalls map cleanup from updateBalancesFor's finally block
into the timeout wrapper's finally block. This prevents a late-returning
call from deleting a newer map entry after timeout.
The getCustomBalances call in saveTradingLog has no timeout protection.
If a blockchain RPC call hangs (e.g. Firo), the entire finance log cron
is blocked for the full lock timeout (30 min), causing gaps in the
FinancialDataLog.

Wrap the call with Util.timeout(30s) to match the timeout added to
BlockchainAdapter in #3468.
…geOrder (#3471)

PR #3462 switched to availableAmount globally, but this over-corrected
for exchanges like XT where locked funds are trading orders not tracked
as exchangeOrder. This caused ~40k CHF to silently drop from the balance.

Revert to amount as liquidity base. Instead, deduct the locked portion
(amount - availableAmount) from exchangeOrder to avoid the Scrypt
double-counting that #3462 originally fixed.
Separate Scrypt balance into "Scrypt Spot" (liquidity + custom) and
"Scrypt Pending" (in-transit funds) so the financial dashboard shows
actual exchange balance vs pending transfers.
@TaprootFreak TaprootFreak merged commit d96b78f into main Mar 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant