cryptoadvance / cryptoadvance/specter-desktop

Show LBTC / L-sat if a Liquid wallet has only LBTC

Open
#1,830 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
847
Forks
259
Avg merge
6d 18h
Merged PRs (30d)
2

Description

### Background

The current logic on master is to show BTC/sat if there are no Liquid assets, and show a select box with all assets and LBTC if ther are any assets:

![grafik](https://user-images.githubusercontent.com/70536101/181918817-8f70920b-8b72-4612-bd48-d2587320e134.png)

If a Liquid wallet has only LBTC the UI displays this:

grafik

It would be better to changes the units, like so:

![grafik](https://user-images.githubusercontent.com/70536101/181918755-19687c6b-9613-408d-b54a-760315dc11fb.png)

### Approach

In `recipient-box.html ` add an `elif` (`{% elif specter.is_liquid and wallet.balance["assets"] == {} %}`) in `addAssetSelectorToShadowRoot()` and adjust `updateUnitLabelAndStep()`

Contributor guide

Open the contributing guide

Research direction

Start in recipient-box.html and inspect addAssetSelectorToShadowRoot() and updateUnitLabelAndStep(). Reproduce the case of a Liquid wallet whose assets mapping is empty but whose balance is LBTC, then verify the UI shows LBTC and L-sat units instead of the asset selector.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, python
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.