Zondax / ledger-tezos

Apache License 2.0
8 stars 5 forks source link

Show NVM errors on screen #163

Open ghost opened 3 years ago

ghost commented 3 years ago

Currently when an error happens due to NVM corruption we just return an error to the APDU, this is because this code was made before we had UI in rust so this was the simplest (and correct) way to handle these kind of issues.

Now that we do have UI in rust, it would be very friendly if we could somewhat display this issue on the screen, so that the user can see what the problem is and also aid in troubleshooting (ie if the screen shows "NVM corrupt" the user needs to change their device)

Related issue: #97

See https://github.com/Zondax/ledger-tezos/blob/ef4425540c7425b359e4112c52e07f4520207765/rust/app/src/handlers/baking.rs#L144 https://github.com/Zondax/ledger-tezos/blob/ef4425540c7425b359e4112c52e07f4520207765/rust/app/src/handlers/baking.rs#L179

:link: zboto Link

jleni commented 3 years ago

related to #167 we could eventually change the "ready" to some error related message if the device is not usable anymore.

ghost commented 3 years ago

Not sure this is related to #167 that much, as these are 2 different situations: display entrypoint is while showing the transfer operation, where we show the amount fees etc, this issue is not a "normal" state, like the entrypoint it