vulpemventures / ocean

:ocean: Elements/Liquid wallet daemon
MIT License
5 stars 7 forks source link

Fix total balance #56

Closed altafan closed 1 year ago

altafan commented 1 year ago

At the moment the total balance returned by the service is a sum of confirmed + unconfirmed + locked but this is not correct because whenever a tx spending some utxo with some change gets accepted in mempool, both the utxos spent as input and those unconfirmed as outputs are taken into account in the total balance.

Example: https://github.com/tdex-network/tdex-daemon/issues/700

The correct total balance is the sum of confirmed and unconfirmed without taking into account the locked one.