@@ -169,23 +169,23 @@ pub trait AccountSigner {
169169 options : Self :: SigningOptions ,
170170 message : & str ,
171171 format : MessageFormat ,
172- credentials : SigningCredential ,
172+ credentials : & SigningCredential ,
173173 ) -> impl std:: future:: Future < Output = Result < String , EngineError > > + Send ;
174174
175175 /// Sign typed data
176176 fn sign_typed_data (
177177 & self ,
178178 options : Self :: SigningOptions ,
179179 typed_data : & TypedData ,
180- credentials : SigningCredential ,
180+ credentials : & SigningCredential ,
181181 ) -> impl std:: future:: Future < Output = Result < String , EngineError > > + Send ;
182182
183183 /// Sign a transaction
184184 fn sign_transaction (
185185 & self ,
186186 options : Self :: SigningOptions ,
187- transaction : TypedTransaction ,
188- credentials : SigningCredential ,
187+ transaction : & TypedTransaction ,
188+ credentials : & SigningCredential ,
189189 ) -> impl std:: future:: Future < Output = Result < String , EngineError > > + Send ;
190190
191191 /// Sign EIP-7702 authorization
@@ -195,7 +195,7 @@ pub trait AccountSigner {
195195 chain_id : u64 ,
196196 address : Address ,
197197 nonce : alloy:: primitives:: U256 ,
198- credentials : SigningCredential ,
198+ credentials : & SigningCredential ,
199199 ) -> impl std:: future:: Future < Output = Result < SignedAuthorization , EngineError > > + Send ;
200200}
201201
@@ -224,7 +224,7 @@ impl AccountSigner for EoaSigner {
224224 options : EoaSigningOptions ,
225225 message : & str ,
226226 format : MessageFormat ,
227- credentials : SigningCredential ,
227+ credentials : & SigningCredential ,
228228 ) -> Result < String , EngineError > {
229229 match credentials {
230230 SigningCredential :: Vault ( auth_method) => {
@@ -260,7 +260,7 @@ impl AccountSigner for EoaSigner {
260260 . sign_message (
261261 auth_token,
262262 thirdweb_auth,
263- message. to_string ( ) ,
263+ message,
264264 options. from ,
265265 options. chain_id ,
266266 Some ( iaw_format) ,
@@ -280,7 +280,7 @@ impl AccountSigner for EoaSigner {
280280 & self ,
281281 options : EoaSigningOptions ,
282282 typed_data : & TypedData ,
283- credentials : SigningCredential ,
283+ credentials : & SigningCredential ,
284284 ) -> Result < String , EngineError > {
285285 match & credentials {
286286 SigningCredential :: Vault ( auth_method) => {
@@ -301,12 +301,7 @@ impl AccountSigner for EoaSigner {
301301 } => {
302302 let iaw_result = self
303303 . iaw_client
304- . sign_typed_data (
305- auth_token. clone ( ) ,
306- thirdweb_auth. clone ( ) ,
307- typed_data. clone ( ) ,
308- options. from ,
309- )
304+ . sign_typed_data ( auth_token, thirdweb_auth, typed_data, options. from )
310305 . await
311306 . map_err ( |e| {
312307 tracing:: error!( "Error signing typed data with EOA (IAW): {:?}" , e) ;
@@ -321,14 +316,14 @@ impl AccountSigner for EoaSigner {
321316 async fn sign_transaction (
322317 & self ,
323318 options : EoaSigningOptions ,
324- transaction : TypedTransaction ,
325- credentials : SigningCredential ,
319+ transaction : & TypedTransaction ,
320+ credentials : & SigningCredential ,
326321 ) -> Result < String , EngineError > {
327322 match credentials {
328323 SigningCredential :: Vault ( auth_method) => {
329324 let vault_result = self
330325 . vault_client
331- . sign_transaction ( auth_method. clone ( ) , transaction, options. from )
326+ . sign_transaction ( auth_method. clone ( ) , transaction. clone ( ) , options. from )
332327 . await
333328 . map_err ( |e| {
334329 tracing:: error!( "Error signing transaction with EOA (Vault): {:?}" , e) ;
@@ -343,7 +338,7 @@ impl AccountSigner for EoaSigner {
343338 } => {
344339 let iaw_result = self
345340 . iaw_client
346- . sign_transaction ( auth_token. clone ( ) , thirdweb_auth. clone ( ) , transaction)
341+ . sign_transaction ( auth_token, thirdweb_auth, & transaction)
347342 . await
348343 . map_err ( |e| {
349344 tracing:: error!( "Error signing transaction with EOA (IAW): {:?}" , e) ;
@@ -361,7 +356,7 @@ impl AccountSigner for EoaSigner {
361356 chain_id : u64 ,
362357 address : Address ,
363358 nonce : U256 ,
364- credentials : SigningCredential ,
359+ credentials : & SigningCredential ,
365360 ) -> Result < SignedAuthorization , EngineError > {
366361 // Create the Authorization struct that both clients expect
367362 let authorization = Authorization {
@@ -373,7 +368,7 @@ impl AccountSigner for EoaSigner {
373368 SigningCredential :: Vault ( auth_method) => {
374369 let vault_result = self
375370 . vault_client
376- . sign_authorization ( auth_method, options. from , authorization)
371+ . sign_authorization ( auth_method. clone ( ) , options. from , authorization)
377372 . await
378373 . map_err ( |e| {
379374 tracing:: error!( "Error signing authorization with EOA (Vault): {:?}" , e) ;
@@ -389,7 +384,7 @@ impl AccountSigner for EoaSigner {
389384 } => {
390385 let iaw_result = self
391386 . iaw_client
392- . sign_authorization ( auth_token, thirdweb_auth, options. from , authorization)
387+ . sign_authorization ( auth_token, thirdweb_auth, options. from , & authorization)
393388 . await
394389 . map_err ( |e| {
395390 tracing:: error!( "Error signing authorization with EOA (IAW): {:?}" , e) ;
0 commit comments