satoshipay / solar

🌞 Stellar wallet. Secure and user-friendly.
https://solarwallet.io
MIT License
192 stars 57 forks source link

Wrong spendable balance for accounts with too many open orders #1223

Closed ebma closed 3 years ago

ebma commented 3 years ago

If an account has more than 10 open orders, the calculated spendable balance is wrong because since not more than 10 open orders are fetched, the app assumes that there are only 10 and reduces the balance by 5.0. If the user hits the "Load more" button below the list of open orders and fetches all orders this way, the spendable balance is correct.

In order to fix this, we might need to fetch all open orders because this affects the calculated minimum amount for trading and sending payments.