Merge develop into master - #34
Closed
sportron-ledger wants to merge 34 commits into
Closed
sportron-ledger wants to merge 34 commits into
sportron-ledger wants to merge 34 commits into
Conversation
…l APDU Prevent root tx process if not in the right state Add a 15s delay for next nested call.
…ization Fix some ruff format issues
… after successful operations
…s and signing nonces
…text after r_list expiry
…across APDU calls
… in review callback
…PDU without fee-limit validation
WIP : Dev swap feature
|
|
||
| /// Convert params->amount into uint64_t | ||
| u128_t raw_amount = {0}; | ||
| if (!swap_str_to_u128((const char *) params->amount, params->amount_length, &raw_amount)) { |
| PRINTF("Validated ticker: %s, decimals: %d\n", swap_validated.ticker, swap_validated.decimals); | ||
|
|
||
| // Save amount | ||
| if (!swap_str_to_u128( |
| G_context.tx.transfer.token_info->ticker); | ||
|
|
||
| if (G_called_from_swap) { | ||
| review_transaction(swap_check_validity(&G_context.tx.transfer, total_fees)); |
Comment on lines
+35
to
+37
| /*#define HASH_INPUT_MAX_LENGTH (8) | ||
|
|
||
| static field_t hash_input[HASH_INPUT_MAX_LENGTH]; | ||
| static char text_buffer[32]; | ||
| static field_t hash_input[HASH_INPUT_MAX_LENGTH];*/ |
| { | ||
| _Static_assert(HASH_INPUT_MAX_LENGTH >= 4, "hash_input size won't fit"); | ||
| int status = -1; | ||
| //_Static_assert(HASH_INPUT_MAX_LENGTH >= 4, "hash_input size won't fit"); |
Comment on lines
+147
to
+166
| /*bigint_256_t s; | ||
| group_t b; | ||
| uint8_t bn_x[32]; | ||
| uint8_t bn_y[32]; | ||
|
|
||
| (void) cx_ecpoint_export(&point_a, bn_x, 32, bn_y, 32); | ||
| bn_to_big_int(bn_x, &s); | ||
| field_from_big_int(&b.x, &s); | ||
| bn_to_big_int(bn_y, &s); | ||
| field_from_big_int(&b.y, &s); | ||
| group_println(&b); | ||
|
|
||
| (void) cx_ecpoint_export(sum, bn_x, 32, bn_y, 32); | ||
| bn_to_big_int(bn_x, &s); | ||
| field_from_big_int(&b.x, &s); | ||
| bn_to_big_int(bn_y, &s); | ||
| field_from_big_int(&b.y, &s); | ||
| group_println(&b); | ||
|
|
||
| PRINTF("\n");*/ |
Comment on lines
+204
to
+206
| // sum_add(&sum, &bhp_512_base_compressed[base_offset]); | ||
| // sum_add_2(&sum, &bhp_1024_base_bn[base_offset]); | ||
| // sum_add_3(&sum, &bhp_512_base[base_offset]); |
Comment on lines
+468
to
+470
| /*bhp_1024_hash(buffer, offset, &function_id); | ||
| PRINTF("function_id : "); | ||
| field_println(&function_id);*/ |
| field_println(&function_id);*/ | ||
|
|
||
| field_t hash; | ||
| // bhp_512_hash_optim(buf_test, 506, &hash); |
Comment on lines
+595
to
+608
| /*(void) cx_ecpoint_init(&point, bn_x, 32, bn_y, 32); | ||
| (void) cx_ecpoint_compress(&point, compressed, 32, &sign); | ||
| PRINTF(" {.compressed = {"); | ||
| for (int j = 0; j < 32; j++) { | ||
| if (j == 16) { | ||
| PRINTF("\n "); | ||
| } | ||
| PRINTF("0x%02x", compressed[j]); | ||
| if (j < 31) { | ||
| PRINTF(", "); | ||
| } | ||
| } | ||
| PRINTF("},\n"); | ||
| PRINTF(" .sign = %d},\n", sign);*/ |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
develop