EIP-712 v0 small cleanup

This commit is contained in:
Alexandre Paillier
2024-05-24 13:46:06 +02:00
parent a8645103f2
commit ec2e17b8b4
2 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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,