Issue:
When placing a trader order with the full amount available in the master account, closing the order causes errors and the sub account gets stuck with funds not returning to the master account.
Steps to reproduce:
- Place a trader order using the full amount available in master account
- Close the order
Error observed:
Console error: useSyncTrades cleanup queue task failed
Result:
- Sub account gets stuck
- Balance does not return to master account
- User cannot access their funds
Expected behavior:
- Order closes cleanly without errors
- Sub account balance properly returns to master account
- No console errors