Skip to content

Commit

Permalink
Merge pull request #232 from LedgerHQ/y333/swap_add_fees_mngt
Browse files Browse the repository at this point in the history
Add fees management in swap
  • Loading branch information
yogh333 authored Jan 14, 2025
2 parents 73c7117 + 061c674 commit 16189cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ledger_device_sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ledger_device_sdk"
version = "1.19.2"
version = "1.19.3"
authors = ["yhql", "yogh333", "agrojean-ledger", "kingofpayne"]
edition = "2021"
license.workspace = true
Expand Down
5 changes: 5 additions & 0 deletions ledger_device_sdk/src/libcall/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub struct PrintableAmountParams {
pub amount: [u8; 16],
pub amount_len: usize,
pub amount_str: *mut i8,
pub is_fee: bool,
}

impl Default for PrintableAmountParams {
Expand All @@ -38,6 +39,7 @@ impl Default for PrintableAmountParams {
amount: [0; 16],
amount_len: 0,
amount_str: core::ptr::null_mut(),
is_fee: false,
}
}
}
Expand Down Expand Up @@ -130,6 +132,9 @@ pub fn get_printable_amount_params(arg0: u32) -> PrintableAmountParams {

let mut printable_amount_params: PrintableAmountParams = Default::default();

debug_print("==> GET_IS_FEE\n");
printable_amount_params.is_fee = params.is_fee == true;

debug_print("==> GET_AMOUNT_LENGTH\n");
printable_amount_params.amount_len = params.amount_length as usize;

Expand Down

0 comments on commit 16189cf

Please sign in to comment.