-
Notifications
You must be signed in to change notification settings - Fork 4
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
Ledger Review Fixes #3
Conversation
…w, where transaction hash confirmation page would get stuck if cancelled
…nanos, redo test golden run (subtle differences in rendering)
…command due to uninitialized variable elementIndex in the context, make error handling consistent across devices
Make Back Button Work
530cc21
to
556616a
Compare
format_hex returns uppercase hex which is not what users are used to and makes it different to visually compare things like addresses. I was unable to get snprintf to work (always returned 0 and no error emitted with HAVE_SNPRINTF_DEBUG) but looking at the code anyways it doesn't seem like it supports uint64s: https://github.com/LedgerHQ/nanos-secure-sdk/blob/0532bf20fbbb11dd08dada62060f8337097b6078/src/os_printf.c#L572 as there is no unsigned long long / 'l' formatter. Re: glyphs, icon_validate is used in the UI for txn signing on Nano S / Nano X:
Everything else I can fix. |
True, we should add a lower case version in the SDK someday...
Indeed, I missed that you where looking to display big numbers like this. Though I'm still not sure this is really needed?
You could use C_icon_validate_14 from the SDK instead: https://github.com/LedgerHQ/ledger-secure-sdk/blob/master/lib_ux/glyphs/icon_validate_14.gif |
The first failure is because the version of clang-format I have locally formats slightly different for some reason. The second is caused by what appears to be invisible rendering differences on the nanosp (maybe I need to update speculos?). I'll investigate that more. Other than maybe trying to get snprintf to work, these are the main remaining things I need to do:
|
You can probably update the version either on your setup on the CI workflow file?
This is probably because on your setup your are generation snapshot for NanoSP 1.1.0. There is a new version of the SDK / ledger-app-builder docker image which support NanoSP 1.1.1 with very small font changes. |
Do you know what this build error is caused by? It's failing to remove build artifacts before upload and I've never seen that error before. All I changed was code formatting and fixed the test images for the NanoSP. There was a change in https://github.com/LedgerHQ/ledger-app-workflows/commits/master/ earlier today but it has to do with Rust and shouldn't affect this. |
Humf, that's our fault, I'm on it. |
@chris124567 Thanks for the notice, should be good now (I think you might need to relaunch the whole CI jobs, not just failings ones). Sorry for the issue :/ |
Sorry for the delays... one of my lungs spontaneously collapsed. I should be able to work on these issues over the next couple weeks but may be a bit slower because it will take a while for me to get back to 100%. Then we can do the app update submission. Still need to remove exceptions from transaction parsing and a couple other things. |
OK, on second thought, I'm not sure removing TRY/CATCH from txn.c actually improves readability. I would say removing it improved things in the other files but I'm not really seeing the benefits in this case. I started writing code to do it but it's starting to get ugly. We'd basically have to store an error status in the txn_state_t object and check it in a number of locations, which for instance would make every call to need_at_least require a corresponding check (every function that calls those functions need would also need to check the status code), and it would require passing the transaction state to functions that don't operate on it directly like cur2dec or changing the return value semantics in those cases. |
Hello, are you aware of the recently introduced LEDGER_ASSERT() macro? You can learn more about it here: https://github.com/LedgerHQ/ledger-secure-sdk/blob/master/include/ledger_assert.h For the one in
But does that make the code easier to follow than the current version, that's up to you! I'm not sure if I would have done it or not. |
I realized there actually is a public key confirmation page on Stax. You can see it in the snapshots folder under Do you think we are OK to do the app submission now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two additional comments:
- Some comments from the code could be removed I guess.. They are from an old time and are probably at least not completely accurate.
- We merge this recently: nbgl: Add force_page_start to nbgl_layoutTagValue_t LedgerHQ/ledger-secure-sdk#520. This is not available yet, but I think this should be used to simplify the calctxnHash_nbgl.c code. The app should not be responsible of page formatting on NBGL.
Otherwise, kudos for the work of bringing this app to the new standard! IMO the code quality have greatly improved.
WIP PR to house fixes in response to Ledger's review.
Currently have added NanoSP support, added confirmation/cancellation status screen when generating address/pubkey, and adds developer information to the about page in the app. The issue regarding transaction signing on Stax in siacentral web wallet still needs to be resolved.