Skip to content

Commit

Permalink
Fix bad signature when the extrinsic size is over 256 bytes (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang authored Jan 19, 2023
1 parent c0198ac commit 61878cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subxt/src/tx/tx_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl<T: Config, C: OfflineClientT<T>> TxClient<T, C> {
additional_and_extra_params.encode_extra_to(&mut bytes);
additional_and_extra_params.encode_additional_to(&mut bytes);
if bytes.len() > 256 {
signer.sign(T::Hasher::hash_of(&bytes).as_ref())
signer.sign(T::Hasher::hash_of(&Encoded(bytes)).as_ref())
} else {
signer.sign(&bytes)
}
Expand Down

0 comments on commit 61878cc

Please sign in to comment.