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 let pubkey = input
.bip32_derivation .bip32_derivation
.iter() .iter()
.find(|s| s.1 .0 == xpub.root_fingerprint(secp)) .find(|(_, (f, _))| *f == xpub.root_fingerprint(secp))
.map(|f| f.0); .map(|(p, _)| p);
//TODO check actual derivation matches //TODO check actual derivation matches
match pubkey { match pubkey {
Some(pubkey) => input.partial_sigs.contains_key(pubkey), Some(pubkey) => input.partial_sigs.contains_key(pubkey),