destructure tuple to improve clarity

This commit is contained in:
Riccardo Casatta committed 2021-04-16 12:22:47 +02:00
1 parent afcd26032d
commit ff7b74ec27
1 file changed
+2 -2
+2 -2
View File
@@ -767,8 +767,8 @@ fn signature_in_psbt(psbt: &PSBT, key: &DescriptorPublicKey, secp: &SecpCtx) ->
let pubkey = input
.bip32_derivation
.iter()
.find(|s| s.1 .0 == xpub.root_fingerprint(secp))
.map(|f| f.0);
.find(|(_, (f, _))| *f == xpub.root_fingerprint(secp))
.map(|(p, _)| p);
//TODO check actual derivation matches
match pubkey {
Some(pubkey) => input.partial_sigs.contains_key(pubkey),