destructure tuple to improve clarity

This commit is contained in:
Riccardo Casatta 2021-04-15 16:07:02 +02:00
parent afcd26032d
commit ff7b74ec27
No known key found for this signature in database
GPG Key ID: FD986A969E450397

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),