Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching the balance mixes different assets #628

Open
victor-piekarski opened this issue Dec 22, 2024 · 6 comments
Open

Fetching the balance mixes different assets #628

victor-piekarski opened this issue Dec 22, 2024 · 6 comments
Milestone

Comments

@victor-piekarski
Copy link

Issue
sdk.get_info() shows mixed balance of different assets.

Description
By accident, I've sent 1 USDT to my liquid address and now my wallet shows me that I have 1 L-BTC. I also have 6,600 LBTC SATS there, so now I keep getting my balance mixed. In response from sdk.get_info() the total sum shows up like 100,006,600 SATS.
I know that Breez doesn't support USDT yet, but we can still have a situation like this.
Please have a look at my suggestion below.

Expected behavior
I would like to have my wallet's balance details separated by asset.

Suggestion
It would be really useful to have details been added to response from sdk.get_info(). Now it returns this object:

{
  balance_sat: number;
  pending_send_sat: number;
  pending_receive_sat: number;
  fingerprint: number;
  pubkey: string;
}

and the issue could be resolved by adding asset details to this response. Something like this:

{
  balance_sat: number;
  pending_send_sat: number;
  pending_receive_sat: number;
  fingerprint: number;
  pubkey: string;
  assets: [
    {
      asset_id: string;
      balance: number;
      ticker: 'L-BTC' | 'USDt'
    }
  ]
}

Environment
Breez SDK Liquid for Python, v. 0.5.1
MAINNET

Thanks for your work!

@kingonly
Copy link
Member

This will be resolved once we support multiple assets which is next on our roadmap.

@victor-piekarski
Copy link
Author

victor-piekarski commented Jan 22, 2025

@kingonly @hydra-yse @roeierez

After updating to version 0.6.2 I'm not able to see my balance. I'm always getting 0 SATS.
When rolling back to 0.5.1 the issue is gone.

I believe it's because of my LBTC SATS coming from different asset, than specified in your hotfix here: https://github.com/breez/breez-sdk-liquid/pull/630/files

We have to use 0.5.1 for now, but it's not a problem for us.

@roeierez
Copy link
Member

@victor-piekarski in 0.6.2 we filter non l-btc assets since it caused inconsistency.
The upcoming release includes full support, should be very soon.

@victor-piekarski
Copy link
Author

victor-piekarski commented Jan 22, 2025

@roeierez my transactions are coming from this asset: 6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d and it is a L-BTC asset: https://blockstream.info/liquid/asset/6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d

And in the temporary solution, if I'm not mistaken, there is a static asset filter, when you're filtering not by L-BTC ticker, but by just a single L-BTC asset, that you know it is a L-BTC asset. So when using 0.6.2 version with this temporary solution, I can see L-BTC balance only from your filtered asset and not from all L-BTC assets. In 0.5.1 there was no issue with that.

Image

@roeierez
Copy link
Member

roeierez commented Jan 22, 2025

Right. Currently the temporary solution is to support only l-btc issued by blockstream.
In the next release you will be able to configure support for other type of assets.

@victor-piekarski
Copy link
Author

Got it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@roeierez @kingonly @victor-piekarski and others