Incorrect runtime balance calculation in synchronization process
Based on my understanding of this code, it appears that you created a partial copy of the hafd.account_operations
table into the btracker
schema and are calculating balances at runtime. This approach is incorrect.
The synchronization process should involve pre-calculating the balance for each account. The endpoint should then simply retrieve these pre-computed balances and return them in the appropriate format.
Edited by Michal Zander