diff --git a/bitcoin_client_rs/Cargo.toml b/bitcoin_client_rs/Cargo.toml index d68b72bd3..cb3325f15 100644 --- a/bitcoin_client_rs/Cargo.toml +++ b/bitcoin_client_rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ledger_bitcoin_client" -version = "0.4.0" +version = "0.4.1" authors = ["Edouard Paris "] edition = "2018" description = "Ledger Bitcoin application client" diff --git a/bitcoin_client_rs/src/psbt.rs b/bitcoin_client_rs/src/psbt.rs index fabfb250a..8708a64e9 100644 --- a/bitcoin_client_rs/src/psbt.rs +++ b/bitcoin_client_rs/src/psbt.rs @@ -411,13 +411,13 @@ impl PartialSignature { .map_err(PartialSignatureError::XOnlyPubKey)?; let tap_leaf_hash = TapLeafHash::from_slice(&slice[33..65]).map_err(PartialSignatureError::TapLeaf)?; - let sig = taproot::Signature::from_slice(&slice[65..]) + let sig = taproot::Signature::from_slice(&slice[key_augment_len + 1..]) .map_err(PartialSignatureError::TaprootSig)?; Ok(Self::TapScriptSig(key, Some(tap_leaf_hash), sig)) } else if key_augment_len == 32 { let key = XOnlyPublicKey::from_slice(&slice[1..33]) .map_err(PartialSignatureError::XOnlyPubKey)?; - let sig = taproot::Signature::from_slice(&slice[65..]) + let sig = taproot::Signature::from_slice(&slice[key_augment_len + 1..]) .map_err(PartialSignatureError::TaprootSig)?; Ok(Self::TapScriptSig(key, None, sig)) } else {