Skip to content

Commit

Permalink
Fix snapshots to latest containers
Browse files Browse the repository at this point in the history
  • Loading branch information
relatko committed Mar 21, 2024
1 parent bdfae1d commit 9922fae
Show file tree
Hide file tree
Showing 1,068 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "cx.h"

__Z_INLINE digest_type_e get_hash_type(const uint16_t options) {
const uint8_t hash_type = (uint8_t)(options & 0xFF);
const uint8_t hash_type = (uint8_t) (options & 0xFF);
switch (hash_type) {
case 0x01:
zemu_log_stack("path: sha2_256");
Expand All @@ -41,7 +41,7 @@ __Z_INLINE digest_type_e get_hash_type(const uint16_t options) {
}

__Z_INLINE cx_curve_t get_cx_curve(const uint16_t options) {
const uint8_t curve_code = (uint8_t)((options >> 8) & 0xFF);
const uint8_t curve_code = (uint8_t) ((options >> 8) & 0xFF);
switch (curve_code) {
case 0x02: {
zemu_log_stack("curve: secp256r1");
Expand Down
6 changes: 3 additions & 3 deletions src/parser_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ parser_error_t json_matchToken(const parsed_json_t *parsedJson,
return PARSER_UNEXPECTED_TYPE;
}

if (token.end < token.start || strlen(expectedValue) != (size_t)(token.end - token.start)) {
if (token.end < token.start || strlen(expectedValue) != (size_t) (token.end - token.start)) {
return PARSER_UNEXPECTED_VALUE;
}

Expand All @@ -211,7 +211,7 @@ parser_error_t json_matchNull(const parsed_json_t *parsedJson, uint16_t tokenIdx
return PARSER_UNEXPECTED_TYPE;
}

if (token.end < token.start || 4 != (size_t)(token.end - token.start)) {
if (token.end < token.start || 4 != (size_t) (token.end - token.start)) {
return PARSER_UNEXPECTED_VALUE;
}

Expand Down Expand Up @@ -584,7 +584,7 @@ parser_error_t _countArgumentItems(const flow_argument_list_t *v,
void checkAddressUsedInTx() {
addressUsedInTx = 0;
uint16_t authCount = parser_tx_obj.authorizers.authorizer_count;
for (uint16_t i = 0; i < (uint16_t)(authCount + 2); i++) { //+2 for proposer and payer
for (uint16_t i = 0; i < (uint16_t) (authCount + 2); i++) { //+2 for proposer and payer
parser_context_t *ctx = NULL;
if (i > authCount) ctx = &parser_tx_obj.payer.ctx;
if (i == authCount) ctx = &parser_tx_obj.proposalKeyAddress.ctx;
Expand Down
3 changes: 2 additions & 1 deletion src/parser_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,8 @@ parser_error_t parser_getItem_internal(int8_t *displayIdx,
SCREEN(true) {
snprintf(outKey, outKeyLen, "Type");
snprintf(outVal, outValLen, "%s", parser_tx_obj.metadata.txName);
zemu_log(outVal);zemu_log("\n");
zemu_log(outVal);
zemu_log("\n");
return PARSER_OK;
}
} else {
Expand Down
17 changes: 8 additions & 9 deletions src/tx_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ struct {
} txMetadataState;

static const uint8_t merkleTreeRoot[METADATA_HASH_SIZE] = {
0xe5, 0xde, 0x7e, 0x03, 0x15, 0x1b, 0x79, 0xa5, 0x30, 0xf2, 0x98, 0x06, 0x44, 0x4d, 0x17, 0x64,
0xa0, 0xdb, 0xd4, 0x82, 0x3e, 0xa3, 0x8e, 0xb5, 0x81, 0x44, 0xf2, 0xe5, 0x51, 0xef, 0x90, 0xd9
};
0xe5, 0xde, 0x7e, 0x03, 0x15, 0x1b, 0x79, 0xa5, 0x30, 0xf2, 0x98, 0x06, 0x44, 0x4d, 0x17, 0x64,
0xa0, 0xdb, 0xd4, 0x82, 0x3e, 0xa3, 0x8e, 0xb5, 0x81, 0x44, 0xf2, 0xe5, 0x51, 0xef, 0x90, 0xd9};

static const char *STRING_TYPE_STRING = "String";
static const char *UINT8_TYPE_STRING = "UInt8";
Expand Down Expand Up @@ -176,10 +175,8 @@ static parser_error_t parseTxMetadataInternal(const uint8_t scriptHash[METADATA_
for (int i = 0; i < parsedTxMetadata->argCount; i++) {
uint8_t argumentType = 0;
READ_CHAR(&argumentType);
if (argumentType != ARGUMENT_TYPE_NORMAL &&
argumentType != ARGUMENT_TYPE_OPTIONAL &&
argumentType != ARGUMENT_TYPE_ARRAY &&
argumentType != ARGUMENT_TYPE_STRING &&
if (argumentType != ARGUMENT_TYPE_NORMAL && argumentType != ARGUMENT_TYPE_OPTIONAL &&
argumentType != ARGUMENT_TYPE_ARRAY && argumentType != ARGUMENT_TYPE_STRING &&
argumentType != ARGUMENT_TYPE_HASH_ALGO &&
argumentType != ARGUMENT_TYPE_SIGNATURE_ALGO &&
argumentType != ARGUMENT_TYPE_NODE_ROLE) {
Expand Down Expand Up @@ -211,14 +208,16 @@ static parser_error_t parseTxMetadataInternal(const uint8_t scriptHash[METADATA_
break;
case ARGUMENT_TYPE_STRING:
parsedTxMetadata->arguments[i].jsonExpectedType = STRING_TYPE_STRING;
parsedTxMetadata->arguments[i].jsonExpectedTypeLength = strlen(STRING_TYPE_STRING);
parsedTxMetadata->arguments[i].jsonExpectedTypeLength =
strlen(STRING_TYPE_STRING);
parsedTxMetadata->arguments[i].jsonExpectedKind = JSMN_STRING;
break;
case ARGUMENT_TYPE_HASH_ALGO:
case ARGUMENT_TYPE_SIGNATURE_ALGO:
case ARGUMENT_TYPE_NODE_ROLE:
parsedTxMetadata->arguments[i].jsonExpectedType = UINT8_TYPE_STRING;
parsedTxMetadata->arguments[i].jsonExpectedTypeLength = strlen(UINT8_TYPE_STRING);
parsedTxMetadata->arguments[i].jsonExpectedTypeLength =
strlen(UINT8_TYPE_STRING);
parsedTxMetadata->arguments[i].jsonExpectedKind = JSMN_STRING;
break;
default:
Expand Down
6 changes: 2 additions & 4 deletions src/tx_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ typedef enum {

typedef struct {
argument_type_e argumentType;
uint8_t
arrayMinElements; // defined only for ARGUMENT_TYPE_ARRAY
uint8_t
arrayMaxElements; // defined only for ARGUMENT_TYPE_ARRAY
uint8_t arrayMinElements; // defined only for ARGUMENT_TYPE_ARRAY
uint8_t arrayMaxElements; // defined only for ARGUMENT_TYPE_ARRAY
const char *displayKey;
uint8_t displayKeyLength;
uint8_t argumentIndex; // argument index within transaction
Expand Down
Binary file modified tests/snapshots/nanosp/test_app_mainmenu/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/nanosp/test_get_public_key_expert/00001.png
Binary file modified tests/snapshots/nanosp/test_get_public_key_expert/00002.png
Binary file modified tests/snapshots/nanosp/test_get_public_key_slot/part0/00001.png
Binary file modified tests/snapshots/nanosp/test_get_public_key_slot/part1/00001.png
Binary file modified tests/snapshots/nanosp/test_get_slot_accepted/part0/00001.png
Binary file modified tests/snapshots/nanosp/test_get_slot_accepted/part1/00001.png
Binary file modified tests/snapshots/nanosp/test_get_slot_accepted/part2/00001.png
Binary file modified tests/snapshots/nanosp/test_get_slot_refused/00001.png
Binary file modified tests/snapshots/nanosp/test_get_slot_refused/00005.png
Binary file modified tests/snapshots/nanosp/test_message_normal/part0/00002.png
Binary file modified tests/snapshots/nanosp/test_message_normal/part0/00003.png
Binary file modified tests/snapshots/nanosp/test_message_normal/part1/00002.png
Binary file modified tests/snapshots/nanosp/test_message_normal/part2/00001.png
Binary file modified tests/snapshots/nanosp/test_message_normal/part2/00002.png
Binary file modified tests/snapshots/nanosp/test_message_normal/part3/00002.png
Binary file modified tests/snapshots/nanosp/test_message_normal/part3/00003.png
Binary file modified tests/snapshots/nanosp/test_message_normal/part4/00002.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part0/00001.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part0/00002.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part1/00004.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part1/00005.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part1/00006.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part1/00007.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part1/00008.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part1/00009.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part1/00013.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part2/00004.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part2/00005.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part2/00006.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part2/00007.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part2/00008.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part2/00009.png
Binary file modified tests/snapshots/nanosp/test_transaction_expert/part2/00013.png
Loading

0 comments on commit 9922fae

Please sign in to comment.