Fix GetKey for sets to properly compare the fingerprint

This commit is contained in:
Nadav Ivgi 2024-09-13 11:28:17 +03:00
parent 0c2737f25a
commit d25c62bf45
No known key found for this signature in database
GPG Key ID: 81F6104CD0F150FC
1 changed files with 1 additions and 1 deletions

View File

@ -807,7 +807,7 @@ impl GetKey for $set<Xpriv> {
KeyRequest::Pubkey(_) => Err(GetKeyError::NotSupported),
KeyRequest::Bip32((fingerprint, path)) => {
for xpriv in self.iter() {
if xpriv.parent_fingerprint == fingerprint {
if xpriv.fingerprint(secp) == fingerprint {
let k = xpriv.derive_priv(secp, &path);
return Ok(Some(k.to_priv()));
}