From 91339e51a53eb6b4bf3337e1ab5bd1ab253d1791 Mon Sep 17 00:00:00 2001 From: pasta Date: Mon, 12 Oct 2026 05:35:04 +0000 Subject: [PATCH] fix(dash-spv-ffi): encode the truncated wallet id with hex-conservative #1104 added two `hex::encode` calls in the chain-truncated callback, but #1115 had already moved the workspace off the `hex` crate, so `dash-spv-ffi` stops compiling on dev. Use `DisplayHex`, as the rest of the file does. Co-Authored-By: Claude Opus 5.5 --- dash-spv-ffi/src/callbacks.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dash-spv-ffi/src/callbacks.rs b/dash-spv-ffi/src/callbacks.rs index 431f02984..17b1c5543 100644 --- a/dash-spv-ffi/src/callbacks.rs +++ b/dash-spv-ffi/src/callbacks.rs @@ -1213,7 +1213,8 @@ impl FFIWalletEventCallbacks { account_balances, } => { if let Some(cb) = self.on_chain_truncated { - let c_wallet_id = CString::new(hex::encode(wallet_id)).unwrap_or_default(); + let c_wallet_id = + CString::new(wallet_id.to_lower_hex_string()).unwrap_or_default(); let raw_txids: Vec<[u8; 32]> = txids.iter().map(|t| t.to_byte_array()).collect(); let txids_ptr = if raw_txids.is_empty() { @@ -1258,7 +1259,7 @@ impl FFIWalletEventCallbacks { ); } else { tracing::warn!( - wallet_id = %hex::encode(wallet_id), + wallet_id = %wallet_id.to_lower_hex_string(), height, "no on_chain_truncated callback set; the consumer will keep \ mirroring transactions the wallet dropped after a fork"