-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #689 from LedgerHQ/misc/apa/unlink_eip712_nbgl_imp…
…lementations Unlink NBGL implementations of EIP-712 v0 and full
- Loading branch information
Showing
3 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
#include "ui_nbgl.h" | ||
#include "ui_logic.h" | ||
#include "common_712.h" | ||
|
||
void ui_typed_message_review_choice(bool confirm) { | ||
static void ui_typed_message_review_choice_common(bool confirm, | ||
unsigned int (*approve_func)(), | ||
unsigned int (*reject_func)()) { | ||
if (confirm) { | ||
ui_712_approve(); | ||
approve_func(); | ||
nbgl_useCaseReviewStatus(STATUS_TYPE_MESSAGE_SIGNED, ui_idle); | ||
} else { | ||
ui_712_reject(); | ||
reject_func(); | ||
nbgl_useCaseReviewStatus(STATUS_TYPE_MESSAGE_REJECTED, ui_idle); | ||
} | ||
} | ||
|
||
void ui_typed_message_review_choice_v0(bool confirm) { | ||
ui_typed_message_review_choice_common(confirm, ui_712_approve_cb, ui_712_reject_cb); | ||
} | ||
|
||
#ifdef HAVE_EIP712_FULL_SUPPORT | ||
void ui_typed_message_review_choice(bool confirm) { | ||
ui_typed_message_review_choice_common(confirm, ui_712_approve, ui_712_reject); | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters