File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
crates/anvil-polkadot/src/api_server Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use crate::api_server::{
33 revive_conversions:: ReviveAddress ,
44} ;
55use alloy_dyn_abi:: TypedData ;
6- use alloy_primitives:: Address ;
6+ use alloy_primitives:: { Address , utils :: eip191_hash_message } ;
77use polkadot_sdk:: pallet_revive:: evm:: { Account , TransactionSigned , TransactionUnsigned } ;
88use std:: collections:: HashMap ;
99use subxt:: utils:: H160 ;
@@ -46,7 +46,8 @@ impl DevSigner {
4646 . keypairs
4747 . get ( & ReviveAddress :: from ( address) . inner ( ) )
4848 . ok_or ( Error :: NoSignerAvailable ) ?;
49- let mut signature = keypair. sign ( message) . 0 ;
49+ let hash = eip191_hash_message ( message) ;
50+ let mut signature = keypair. sign_prehashed ( hash. as_ref ( ) ) . 0 ;
5051 signature[ 64 ] = Self :: recovery_id_mapper ( signature[ 64 ] ) ;
5152 Ok ( signature)
5253 }
You can’t perform that action at this time.
0 commit comments