Skip to content

Commit

Permalink
[starknet] Display max fees in fri (STRK 10e-18) units
Browse files Browse the repository at this point in the history
  • Loading branch information
yogh333 committed Aug 1, 2024
1 parent 1424647 commit d85bf94
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion starknet/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ pub fn show_tx(ctx: &mut Ctx) -> Option<bool> {
let max_amount = FieldElement::from(&tx.l1_gas_bounds.value[8..16]);
let max_price_per_unit = FieldElement::from(&tx.l1_gas_bounds.value[16..32]);
let max_fees = max_amount * max_price_per_unit;
let max_fees_str = max_fees.to_dec_string(Some(18));
let mut max_fees_str = max_fees.to_dec_string(None);
max_fees_str.push_str(" fri");

testing::debug_print("Compute fees OK \n");

Expand Down
Binary file modified tests/snapshots/flex/test_clear_sign_tx/00002.png
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_clear_sign_tx/00007.png
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/nanox/test_clear_sign_tx/00007.png
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/stax/test_clear_sign_tx/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d85bf94

Please sign in to comment.