From 61878cc20ad755832bd908eb316cf9c60589a1e2 Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Thu, 19 Jan 2023 18:48:06 +0800 Subject: [PATCH] Fix bad signature when the extrinsic size is over 256 bytes (#796) --- subxt/src/tx/tx_client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subxt/src/tx/tx_client.rs b/subxt/src/tx/tx_client.rs index eb84d14eed..5abe69affd 100644 --- a/subxt/src/tx/tx_client.rs +++ b/subxt/src/tx/tx_client.rs @@ -169,7 +169,7 @@ impl> TxClient { 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) }