EIP-712 v0 small cleanup
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define UI_MESSAGE_SIGNING_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "ui_signing.h"
|
||||
|
||||
#define TEXT_MESSAGE "message"
|
||||
#define TEXT_TYPED_MESSAGE "typed " TEXT_MESSAGE
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
#include "ui_nbgl.h"
|
||||
#include "common_712.h"
|
||||
#include "ui_message_signing.h"
|
||||
#include "ui_signing.h"
|
||||
|
||||
static nbgl_contentTagValue_t pairs[2];
|
||||
static nbgl_contentTagValueList_t pairsList;
|
||||
static nbgl_contentTagValueList_t pairs_list;
|
||||
|
||||
static void message_review_choice(bool confirm) {
|
||||
if (confirm) {
|
||||
@@ -24,7 +23,7 @@ static char *format_hash(const uint8_t *hash, char *buffer, size_t buffer_size,
|
||||
|
||||
void ui_sign_712_v0(void) {
|
||||
explicit_bzero(pairs, sizeof(pairs));
|
||||
explicit_bzero(&pairsList, sizeof(pairsList));
|
||||
explicit_bzero(&pairs_list, sizeof(pairs_list));
|
||||
|
||||
pairs[0].item = "Domain hash";
|
||||
pairs[0].value = format_hash(tmpCtx.messageSigningContext712.domainHash,
|
||||
@@ -37,12 +36,12 @@ void ui_sign_712_v0(void) {
|
||||
sizeof(strings.tmp.tmp),
|
||||
70);
|
||||
|
||||
pairsList.nbPairs = ARRAYLEN(pairs);
|
||||
pairsList.pairs = pairs;
|
||||
pairsList.nbMaxLinesForValue = 0;
|
||||
pairs_list.nbPairs = ARRAYLEN(pairs);
|
||||
pairs_list.pairs = pairs;
|
||||
pairs_list.nbMaxLinesForValue = 0;
|
||||
|
||||
nbgl_useCaseReview(TYPE_MESSAGE,
|
||||
&pairsList,
|
||||
&pairs_list,
|
||||
&C_Review_64px,
|
||||
TEXT_REVIEW_EIP712,
|
||||
NULL,
|
||||
|
||||
Reference in New Issue
Block a user