Skip to content

Commit 16189cf

Browse files
authored
Merge pull request #232 from LedgerHQ/y333/swap_add_fees_mngt
Add fees management in swap
2 parents 73c7117 + 061c674 commit 16189cf

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ledger_device_sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ledger_device_sdk"
3-
version = "1.19.2"
3+
version = "1.19.3"
44
authors = ["yhql", "yogh333", "agrojean-ledger", "kingofpayne"]
55
edition = "2021"
66
license.workspace = true

ledger_device_sdk/src/libcall/swap.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ pub struct PrintableAmountParams {
3030
pub amount: [u8; 16],
3131
pub amount_len: usize,
3232
pub amount_str: *mut i8,
33+
pub is_fee: bool,
3334
}
3435

3536
impl Default for PrintableAmountParams {
@@ -38,6 +39,7 @@ impl Default for PrintableAmountParams {
3839
amount: [0; 16],
3940
amount_len: 0,
4041
amount_str: core::ptr::null_mut(),
42+
is_fee: false,
4143
}
4244
}
4345
}
@@ -130,6 +132,9 @@ pub fn get_printable_amount_params(arg0: u32) -> PrintableAmountParams {
130132

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

135+
debug_print("==> GET_IS_FEE\n");
136+
printable_amount_params.is_fee = params.is_fee == true;
137+
133138
debug_print("==> GET_AMOUNT_LENGTH\n");
134139
printable_amount_params.amount_len = params.amount_length as usize;
135140

0 commit comments

Comments
 (0)