mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-04 21:45:24 +01:00
fix(wallet): compare x_only_pubkey when checking if wallet can unlock p2pk
This commit is contained in:
@@ -1336,7 +1336,7 @@ impl Wallet {
|
||||
let pubkey_secret_key = match &signing_keys {
|
||||
Some(signing_keys) => signing_keys
|
||||
.iter()
|
||||
.map(|s| (s.public_key().to_string(), s))
|
||||
.map(|s| (s.public_key().x_only_public_key(), s))
|
||||
.collect(),
|
||||
None => HashMap::new(),
|
||||
};
|
||||
@@ -1385,7 +1385,9 @@ impl Wallet {
|
||||
}
|
||||
}
|
||||
for pubkey in pubkeys {
|
||||
if let Some(signing) = pubkey_secret_key.get(&pubkey.to_string()) {
|
||||
if let Some(signing) =
|
||||
pubkey_secret_key.get(&pubkey.x_only_public_key())
|
||||
{
|
||||
proof.sign_p2pk(signing.to_owned().clone())?;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user