File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -4642,19 +4642,14 @@ int wally_psbt_sign_input_bip32(struct wally_psbt *psbt,
46424642 return WALLY_EINVAL ;
46434643
46444644 /* Find the public key this signature is for */
4645- ret = wally_map_find_bip32_public_key_from (& inp -> keypaths , subindex ,
4646- hdkey , & pubkey_idx );
4647- if (ret != WALLY_OK || !pubkey_idx ) {
4648- /* Try again with the taproot public key */
4645+ if (is_taproot )
46494646 ret = wally_map_find_bip32_public_key_from (& inp -> taproot_leaf_hashes ,
46504647 subindex , hdkey ,
46514648 & pubkey_idx );
4652- if (ret == WALLY_OK && pubkey_idx && !is_taproot )
4653- return WALLY_EINVAL ; /* Must be tr if we have a tr key */
4654- } else if (ret == WALLY_OK && pubkey_idx && is_taproot ) {
4655- return WALLY_EINVAL ; /* Must not be tr if we have a non-tr key */
4656- }
4657-
4649+ else
4650+ ret = wally_map_find_bip32_public_key_from (& inp -> keypaths ,
4651+ subindex , hdkey ,
4652+ & pubkey_idx );
46584653 if (ret != WALLY_OK || !pubkey_idx )
46594654 return WALLY_EINVAL ; /* Signing pubkey key not found */
46604655
You can’t perform that action at this time.
0 commit comments