openethereum / fether

Decentralized and light Ethereum Wallet
BSD 3-Clause "New" or "Revised" License
124 stars 33 forks source link

Balance shown differs on Account, Transaction Confirmation, and Send Transaction pages #359

Open ltfschoen opened 5 years ago

ltfschoen commented 5 years ago

As a user who wants to use the testnet and since Kovan ETH is hard to come (i.e. I'm usually too lazy to request Kovan ETH regularly, since sometimes it doesn't work anyway) I have many accounts with less than 0.01 account balance, and I usually send values less than the account balance (i.e. 0.001 or smaller). But with the current interface, if I have an account with say 0.004421 ETH, it actually shows 0.00 ETH on my Account page.

screen shot 2019-01-15 at 1 56 27 pm

So now suppose this was my "mainnet" account, then with 0.009 ETH I'd have enough to buy you a cheap beer at the current exchange rate, but if I were to look at my account balance on my Account page it shows 0.00 ETH, so if we were at the bar I'd probably have to ask you to buy your own beer.

So I may not be inclined to even use the account since it "appears" to not have any balance at all. But if I were to click the "Ether" card anyway it takes me to the "Send Transaction" page where I'm surprised to discover that I do in fact have 0.004421 ETH.

screen shot 2019-01-15 at 1 53 53 pm

But then when I go to send a transaction with some of my account balance as shown below, on the Confirmation page it shows my account balance as being only 0.00 ETH again, and that I'm about to send 0.0001 ETH from it. I don't think this makes sense.

screen shot 2019-01-15 at 1 54 06 pm
Tbaut commented 5 years ago

i.e. I'm usually too lazy to request Kovan ETH regularly, since sometimes it doesn't work anyway

The faucet should work reliably, and if it doesn't please tell us :)

axelchalon commented 5 years ago

Maybe we can show "< 0.01 ETH" instead of "0.00 ETH" if we don't have enough room to display the exact amount

ltfschoen commented 5 years ago

Maybe we can show "< 0.01 ETH" instead of "0.00 ETH" if we don't have enough room to display the exact amount

Great idea, and even though we do have room I don't think users need to know the precise amount. If we unnecessarily show small balances with many decimal places it just bloats the UI unnecessarily.

On the Account page they just need to know if they have a non-zero value for a token to know whether it's worth clicking the token, so "< 0.01 ETH" delivers the message to them.

On the Send token page they can click the "MAX" button if they really need to know precisely how much they have to play with if they enter an amount that says they have insufficient balance.

On the Send token confirmation page I don't think it's important either, so "< 0.01 ETH" does the job.

There may be some users who only ever deal with small amounts of ETH, so to cater for their needs we could just add to our "Settings" menu the option of Enabling granular balance information.

Shall we go with "< 0.01 ETH" by default?

Tbaut commented 5 years ago

On the Send token page they can click the "MAX" button if they really need to know precisely how much they have to play with if they enter an amount that says they have insufficient balance.

I think the Send token screen should show as many details as possible, 6 to 8 digits after the coma if possible (as it does now). Then the user can click on max to have the exact amount indeed.

Send token confirmation page I don't think it's important either, so "< 0.01 ETH" does the job.

This one will be removed after https://github.com/paritytech/fether/pull/364 so we shouldn't touch it. All in all, only the account token list screen should receive this improvement.