Merge pull request #565 from LedgerHQ/cev/B2CA-1558_Port-Flex

B2CA-1558: Port Ethereum on Flex
This commit is contained in:
Charles-Edouard de la Vergne
2024-05-16 17:44:25 +02:00
committed by GitHub
876 changed files with 905 additions and 1021 deletions

View File

@@ -167,10 +167,10 @@ void ui_712_message_hash(void) {
const char *const title = "Message hash";
ui_712_set_title(title, strlen(title));
bytes_to_string(strings.tmp.tmp,
sizeof(strings.tmp.tmp),
tmpCtx.messageSigningContext712.messageHash,
KECCAK256_HASH_BYTESIZE);
array_bytes_string(strings.tmp.tmp,
sizeof(strings.tmp.tmp),
tmpCtx.messageSigningContext712.messageHash,
KECCAK256_HASH_BYTESIZE);
ui_712_redraw_generic_step();
}
@@ -280,7 +280,7 @@ static bool ui_712_format_bool(const uint8_t *const data, uint8_t length) {
*/
static void ui_712_format_bytes(const uint8_t *const data, uint8_t length) {
if (ui_712_field_shown()) {
bytes_to_string(strings.tmp.tmp, sizeof(strings.tmp.tmp), data, length);
array_bytes_string(strings.tmp.tmp, sizeof(strings.tmp.tmp), data, length);
// +2 for the "0x"
// x2 for each byte value is represented by 2 ASCII characters
if ((2 + (length * 2)) > (sizeof(strings.tmp.tmp) - 1)) {