Improve UI for account balance in send page
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? 🤷♂️
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?
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
frozen coins are frozen for a reason right?
Not 100% certain, but I think coins are only frozen based on user explicitly doing it.
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
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
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
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.
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.
🎨 https://www.figma.com/file/kfejZJFlwBywvLEnPEmJo1/JoinMarket-UI?node-id=2850%3A70953&viewport=-1615%2C-4716%2C0.84
bump :P
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
get me on a call with you and go through the review with me once, lets see if I can be of any help.
Resolved with #600.