Merged
Conversation
#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
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic Release PR
This PR was automatically created after changes were pushed to develop.
Commits: 1 new commit(s)
Checklist