WIP : Dev swap feature - #27
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #27 +/- ##
===========================================
+ Coverage 68.69% 69.75% +1.05%
===========================================
Files 43 44 +1
Lines 5194 5432 +238
Branches 838 856 +18
===========================================
+ Hits 3568 3789 +221
- Misses 1357 1367 +10
- Partials 269 276 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| /// 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"); |
| { | ||
| _Static_assert(HASH_INPUT_MAX_LENGTH >= 6, "hash_input size won't fit"); | ||
| int status = -1; | ||
| //_Static_assert(HASH_INPUT_MAX_LENGTH >= 6, "hash_input size won't fit"); |
| static int graph_key_from_view_key(const scalar_t *view_key, field_t *graph_key) | ||
| { | ||
| _Static_assert(HASH_INPUT_MAX_LENGTH >= 7, "hash_input size won't fit"); | ||
| //_Static_assert(HASH_INPUT_MAX_LENGTH >= 7, "hash_input size won't fit"); |
sportron-ledger
force-pushed
the
dev-swap-feature
branch
from
August 6, 2026 11:11
5c1cedd to
c68a1a9
Compare
sportron-ledger
force-pushed
the
dev-swap-feature
branch
from
August 6, 2026 11:18
c68a1a9 to
8931d93
Compare
sportron-ledger
force-pushed
the
dev-swap-feature
branch
from
August 7, 2026 07:20
412f8ad to
42ceade
Compare
…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
bboilot-ledger
previously approved these changes
Aug 28, 2026
sportron-ledger
force-pushed
the
dev-swap-feature
branch
from
August 28, 2026 13:54
fe6aeb4 to
257f0d1
Compare
sportron-ledger
force-pushed
the
dev-swap-feature
branch
from
August 28, 2026 14:02
257f0d1 to
2cc15dd
Compare
… in review callback
…PDU without fee-limit validation
Contributor
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