jam icon indicating copy to clipboard operation
jam copied to clipboard

Improve UI for account balance in send page

Open ghost opened this issue 3 years ago • 9 comments

See discussion in https://github.com/joinmarket-webui/joinmarket-webui/pull/76#discussion_r802755495.

The balance that's shown when selecting which account to send from, is currently hard coded to whatever is returned from the server. That means it is always shown in BTC and can't be changed to sats.

That's because the <option> element only allows text children so we can't use the <Balance> component.

Maybe there's a way to fix this though? 🤷‍♂️

Screenshot 2022-02-09 at 16 29 22

ghost avatar Feb 09 '22 15:02 ghost

In addition, the balance as currently displayed might not be spendable (e.g. utxo is frozen). There is an issue open on the server repo regarding this, but as discussed in the comments, it seems fair to delegate the handling to the client.

What do you think is the best way to handle this? There is a "balance breakdown" on "sweep" - might it be useful to display it as well when a mixdepth containing frozen coins is selected? Or should it be done differently?

theborakompanioni avatar Apr 01 '22 09:04 theborakompanioni

frozen coins are frozen for a reason right? for the normal user it should be easier to identify what amount can be moved without making bad decision and kill the privacy aspect.

can we re-render the first dropdown when the user switches from B to S(ats) in the second form field?

https://www.figma.com/file/kfejZJFlwBywvLEnPEmJo1/?node-id=3420%3A75738

editwentyone avatar Apr 03 '22 13:04 editwentyone

frozen coins are frozen for a reason right?

Not 100% certain, but I think coins are only frozen based on user explicitly doing it.

MaxHillebrand avatar Apr 03 '22 14:04 MaxHillebrand

Not 100% certain, but I think coins are only frozen based on user explicitly doing it.

Coins are definitely automatically frozen on address reuse. But since nobody is doing that,.. I think you are right : D

theborakompanioni avatar Apr 04 '22 07:04 theborakompanioni

so is there a simple way to access the highest possible amount a user can spend? that is not frozen or anything else. and if we got that back, can we show it in Sats and BTC? right now it is removed from the drop down and the user does not have clue what is max. spendable other then by clicking sweep

editwentyone avatar Apr 13 '22 06:04 editwentyone

also, because collaborative tx are default now, it would be awesome to show the alternative (normal send, deactivated collaborative tx) more direct to the user:

red deactivated slider + rename the send button to another wording, please see

https://www.figma.com/file/kfejZJFlwBywvLEnPEmJo1/?node-id=3427%3A75184

editwentyone avatar Apr 13 '22 07:04 editwentyone

so is there a simple way to access the highest possible amount a user can spend?

Yes but also no. See discussion here. We can do a (really) good estimate though.

ghost avatar Apr 13 '22 08:04 ghost

Parts of this (the BTCC/sats conversion) will be resolved in #276. The "spendable balance" issue remains mostly a UI issue since we'll get the spendable and total balance by the server soon.

ghost avatar May 18 '22 07:05 ghost

🎨 https://www.figma.com/file/kfejZJFlwBywvLEnPEmJo1/JoinMarket-UI?node-id=2850%3A70953&viewport=-1615%2C-4716%2C0.84

image

editwentyone avatar Oct 18 '22 15:10 editwentyone

bump :P

editwentyone avatar Jan 15 '23 01:01 editwentyone

bump :P

This is already on my priority list - need to wait for https://github.com/joinmarket-webui/jam/pull/587 and https://github.com/joinmarket-webui/jam/pull/595 to be merged. Care to review? : D

theborakompanioni avatar Jan 17 '23 11:01 theborakompanioni

get me on a call with you and go through the review with me once, lets see if I can be of any help.

editwentyone avatar Jan 17 '23 16:01 editwentyone

Resolved with #600.

theborakompanioni avatar Feb 13 '23 14:02 theborakompanioni