Skip to content

Commit e4e7ddd

Browse files
committed
preserve order of hex encoding with hashes
1 parent fdf5e10 commit e4e7ddd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

subprojects/gdk_rust/gdk_electrum/src/headers/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl VerifiedCache {
147147
fn new(path: &str, network: NetworkId, key: &str) -> Result<Self, Error> {
148148
let mut filepath: PathBuf = path.into();
149149
let filename_preimage = format!("{:?}{}", network, key);
150-
let filename = sha256::Hash::hash(filename_preimage.as_bytes()).to_hex();
150+
let filename = sha256::Hash::hash(filename_preimage.as_bytes()).as_ref().to_hex();
151151
let key_bytes = sha256::Hash::hash(key.as_bytes()).into_inner();
152152
filepath.push(format!("verified_cache_{}", filename));
153153
let cipher = Aes256GcmSiv::new(Key::from_slice(&key_bytes));

subprojects/gdk_rust/gdk_electrum/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ impl Session<Error> for ElectrumSession {
462462
std::fs::create_dir_all(&path)?;
463463
} else {
464464
if let Some(id) = aqua_wallet_id {
465-
fpath.push(id.to_hex());
465+
fpath.push(id.as_ref().to_hex());
466466
info!("Fallback store root path: {:?}", fpath);
467467
fallback_path = Some(fpath.as_path());
468468
}

0 commit comments

Comments
 (0)