tdex-network / tdex-daemon

Go implementation of the TDEX Beta Daemon
https://tdex.network
MIT License
11 stars 13 forks source link

[v1] GetMarketInfo - incorrect totalBalance #700

Closed Janaka-Steph closed 1 year ago

Janaka-Steph commented 1 year ago
Screenshot 2023-04-17 at 15 54 31

I notice after a withdraw that balance.totalBalance is incorrect. balance.totalBalance is computed as the sum of unconfirmedBalance and lockedBalance, but this is incorrect since the same coins are counted twice.

altafan commented 1 year ago

which balance do you refer to? base, quote, or both?

The amounts returned do not seem wrong to me though:

Janaka-Steph commented 1 year ago

Referring to the quote ac3... I had 19990 and withdraw 10. I have 19980 left. I never had 39970. What do we mean by totalBalance? Maybe I don't interpret this field properly?

Janaka-Steph commented 1 year ago

Also the daemon is slow to confirm balances. Refetching GetMarketInfo 10 seconds after withdraw is not enough, confirmed balance is still zero.

altafan commented 1 year ago

can you make another test and share the balance response before and after the withdrawal?

Janaka-Steph commented 1 year ago

Same behaviour.

Before

Screenshot 2023-04-20 at 16 12 16

After

Screenshot 2023-04-20 at 16 14 27
altafan commented 1 year ago

This must be fixed by ocean.