diff --git a/assets/dusk_wallet_core.wasm b/assets/dusk_wallet_core.wasm index 8f38b3c..75963f0 100755 Binary files a/assets/dusk_wallet_core.wasm and b/assets/dusk_wallet_core.wasm differ diff --git a/dusk-wallet-core-0.21.0.wasm b/dusk-wallet-core-0.21.0.wasm index ce464af..8583802 100644 Binary files a/dusk-wallet-core-0.21.0.wasm and b/dusk-wallet-core-0.21.0.wasm differ diff --git a/src/compat/tx.rs b/src/compat/tx.rs index 16d9c79..b31aa50 100644 --- a/src/compat/tx.rs +++ b/src/compat/tx.rs @@ -12,6 +12,7 @@ use crate::{ }; use alloc::{ + format, string::{String, ToString}, vec::Vec, }; @@ -225,7 +226,7 @@ pub fn get_history(args: i32, len: i32) -> i64 { block_height: note_data.block_height, amount: note_amount - inputs_amount, fee: gas_spent * t.fee().gas_price, - id: hash_to_find.to_string(), + id: transaction_hash(hash_to_find), }), } } else { @@ -256,6 +257,18 @@ pub fn get_history(args: i32, len: i32) -> i64 { utils::into_ptr(types::GetHistoryResponse { history: ret }) } +fn transaction_hash(hash: BlsScalar) -> String { + let mut f = String::new(); + + let tmp = hash.to_bytes(); + + for &b in tmp.iter() { + f.push_str(&format!("{:02x}", b)) + } + + f +} + /// Serialize a unprovenTx we recieved from the wallet-core /// this is copied from old wallet-core (0.20.0-piecrust.0.6) fn utx_to_var_bytes(