-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
chore(core): hardcode ETH and Gwei units in ETH send summary #3414
Conversation
Ahhh, ok, it cannot be like that :(
We should use only Gwei/Wei (without ETH) for gas limit a and priority fee. |
i think we just need to touch the "10^9" number -- so that we get at most, say, 10 decimals? |
Reverted and changed in b428d53 |
Not sure what are the requirements ... but we have good unittests for this function, feel free to suggest some new behavior https://github.com/trezor/trezor-firmware/blob/main/core/tests/test_apps.ethereum.layout.py There are some edge-cases like this, where there will be much more than 10 valid digits: text = format_ethereum_amount(1000000000000000001, None, ETH)
self.assertEqual(text, "1.000000000000000001 ETH") @Hannsek - a general question, who is wanting these changes? |
Why do we have |
That is not the difference between models, but between |
b428d53
to
0873a45
Compare
0873a45
to
7bb569f
Compare
Fixes #3246:
ETH
for amount and total fee,Gwei ETH
for the rest.Not sure, however, that we want to force it, as there are these cases where a very small value gets displayed in a very big unit. Previously, the code was checking this --- either showing
ETH
if the value was bigger than10 ^ 9
andwei ETH
otherwise.