Skip to content
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

App cleanup and new tests #1

Merged
merged 3 commits into from
Oct 2, 2024
Merged

App cleanup and new tests #1

merged 3 commits into from
Oct 2, 2024

Conversation

tdejoigny-ledger
Copy link
Contributor

No description provided.

@tdejoigny-ledger tdejoigny-ledger force-pushed the tdj/new_tests branch 11 times, most recently from 9e4e504 to 1ad6574 Compare September 20, 2024 15:40
src/apdu/dispatcher.c Outdated Show resolved Hide resolved
src/apdu/dispatcher.c Outdated Show resolved Hide resolved
src/types.h Show resolved Hide resolved
src/ui/menu.h Outdated Show resolved Hide resolved
@@ -146,13 +154,16 @@ void ui_menu_main(void) {
switches[DUMMY_SWITCH_2_ID].tuneId = TUNE_TAP_CASUAL;
#endif

homeAction.callback = (nbgl_callback_t) ui_display_review;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This callback type should be:
typedef void (*nbgl_callback_t)(void),
but the function ui_display_review has an input parameter, which is not good!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's true, but it's temporary; this button will launch a page to run flows in a standalone manner.

Copy link
Contributor

@cedelavergne-ledger cedelavergne-ledger Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not fan... Its error prone, even if in this exact situation, it will work.
Better to declare a function with correct prototype, and then call the targeted one without extra parameters...

src/ui/nbgl_display_spinner.c Outdated Show resolved Hide resolved
src/ui/nbgl_display_transaction_legacy.c Show resolved Hide resolved
tests/test_spinner.py Outdated Show resolved Hide resolved
tests/test_use_case_legacy_review.py Outdated Show resolved Hide resolved
tests/test_use_case_review.py Outdated Show resolved Hide resolved
src/apdu/dispatcher.c Show resolved Hide resolved
@@ -146,13 +154,16 @@ void ui_menu_main(void) {
switches[DUMMY_SWITCH_2_ID].tuneId = TUNE_TAP_CASUAL;
#endif

homeAction.callback = (nbgl_callback_t) ui_display_review;
Copy link
Contributor

@cedelavergne-ledger cedelavergne-ledger Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not fan... Its error prone, even if in this exact situation, it will work.
Better to declare a function with correct prototype, and then call the targeted one without extra parameters...

tests/test_use_case_legacy_review.py Outdated Show resolved Hide resolved
tests/test_use_case_legacy_review.py Outdated Show resolved Hide resolved
tests/test_use_case_legacy_review.py Outdated Show resolved Hide resolved
tests/test_use_case_review.py Outdated Show resolved Hide resolved
tests/test_use_case_streaming_review.py Outdated Show resolved Hide resolved
tests/test_use_case_review.py Show resolved Hide resolved
@tdejoigny-ledger tdejoigny-ledger merged commit b027399 into master Oct 2, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants