-
Notifications
You must be signed in to change notification settings - Fork 74
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
POC of wrapped + sync transaction review #111
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #111 +/- ##
=======================================
Coverage 83.01% 83.01%
=======================================
Files 3 3
Lines 53 53
=======================================
Hits 44 44
Misses 9 9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
27d7f03
to
f165504
Compare
f165504
to
b522f6f
Compare
if (apdu_state == APDU_IDLE && G_io_app.apdu_state != APDU_IDLE) { | ||
return NBGL_SYNC_RET_RX_APDU; | ||
} |
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.
not sure to understand the need to end the loop in this case.
New APDU should be ignored because a transaction is already being processed.
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.
This was a proposal to interrupt sync nbgl calls like nbgl_useCaseStatus
, or nbgl_useCaseHome
during which there is no transaction being processed.
But this might indeed disappear as we might want to respond to the APDU only after the timeout of nbgl_useCaseStatus
and I'm not sure we will make a sync version of nbgl_useCaseHome
b736905
to
e671ce6
Compare
bool wrapping) | ||
{ | ||
uint16_t textLen = strlen(text); | ||
const char *origText = text; |
Check notice
Code scanning / CodeQL
Unused local variable Note
uint16_t nbLines = 0; | ||
|
||
while (textLen) { | ||
uint8_t char_width; |
Check notice
Code scanning / CodeQL
Unused local variable Note
} | ||
|
||
// This function is used to retrieve the width of a line of text. | ||
static uint32_t se_compute_line_width_light(const char *text, |
Check notice
Code scanning / CodeQL
Unused static function Note
#ifdef HAVE_BAGL | ||
void io_seproxyhal_display(const bagl_element_t *element) | ||
{ | ||
io_seproxyhal_display_default(element); |
Check warning
Code scanning / CodeQL
Implicit function declaration Warning
} | ||
#else | ||
nbgl_buttonEvent_t event = maskToEvent(button_mask); | ||
layout_buttonCallback(event); |
Check warning
Code scanning / CodeQL
Implicit function declaration Warning
memcpy(&context.review.tagValueList, tagValueList, sizeof(nbgl_layoutTagValueList_t)); | ||
} | ||
|
||
context.review.address = address; |
Check warning
Code scanning / CodeQL
Local variable address stored in non-local memory Warning
parameter
sync_nbgl_ret_t sync_nbgl_useCaseStatus(const char *message, bool isSuccess) | ||
{ | ||
sync_nbgl_init(); | ||
nbgl_useCaseStatus(message, isSuccess, quit_callback); |
Check warning
Code scanning / CodeQL
Call to a function with one or more incompatible arguments Warning
nbgl_useCaseStatus
isSuccess
bool
bool isSuccess
// the screen, and therefore the modal will be dismissed and its callback | ||
// will never be called. | ||
if (ret == UI_RET_APPROVED) { | ||
nbgl_useCaseStatus("ADDRESS\nVERIFIED", true, ui_menu_main); |
Check warning
Code scanning / CodeQL
Call to a function with one or more incompatible arguments Warning
nbgl_useCaseStatus
1
int
bool isSuccess
if (ret == UI_RET_APPROVED) { | ||
nbgl_useCaseStatus("ADDRESS\nVERIFIED", true, ui_menu_main); | ||
} else if (ret == UI_RET_REJECTED) { | ||
nbgl_useCaseStatus("Address verification\ncancelled", false, ui_menu_main); |
Check warning
Code scanning / CodeQL
Call to a function with one or more incompatible arguments Warning
nbgl_useCaseStatus
0
int
bool isSuccess
} else if (ret == UI_RET_REJECTED) { | ||
nbgl_useCaseStatus("Address verification\ncancelled", false, ui_menu_main); | ||
} else { | ||
nbgl_useCaseStatus("Address verification\nissue", false, ui_menu_main); |
Check warning
Code scanning / CodeQL
Call to a function with one or more incompatible arguments Warning
nbgl_useCaseStatus
0
int
bool isSuccess
Replaced by #120 |
No description provided.