@@ -2,19 +2,20 @@ use super::{
2
2
super :: NotPreparedError , Account , AccountError , ConnectedAccount , ExecutionV1 , ExecutionV3 ,
3
3
PreparedExecutionV1 , PreparedExecutionV3 , RawExecutionV1 , RawExecutionV3 ,
4
4
} ;
5
- use crate :: { Call , ExecutionEncoder } ;
5
+ use crate :: ExecutionEncoder ;
6
6
7
7
use starknet_core:: {
8
8
crypto:: compute_hash_on_elements,
9
9
types:: {
10
10
BroadcastedInvokeTransaction , BroadcastedInvokeTransactionV1 ,
11
- BroadcastedInvokeTransactionV3 , BroadcastedTransaction , DataAvailabilityMode , FeeEstimate ,
12
- Felt , InvokeTransactionResult , ResourceBounds , ResourceBoundsMapping , SimulatedTransaction ,
13
- SimulationFlag , SimulationFlagForEstimateFee ,
11
+ BroadcastedInvokeTransactionV3 , BroadcastedTransaction , Call , DataAvailabilityMode ,
12
+ FeeEstimate , Felt , InvokeTransactionResult , ResourceBounds , ResourceBoundsMapping ,
13
+ SimulatedTransaction , SimulationFlag , SimulationFlagForEstimateFee ,
14
14
} ,
15
15
} ;
16
16
use starknet_crypto:: PoseidonHasher ;
17
17
use starknet_providers:: Provider ;
18
+ use starknet_signers:: SignerInteractivityContext ;
18
19
19
20
/// Cairo string for "invoke"
20
21
const PREFIX_INVOKE : Felt = Felt :: from_raw ( [
@@ -271,7 +272,9 @@ where
271
272
& self ,
272
273
nonce : Felt ,
273
274
) -> Result < FeeEstimate , AccountError < A :: SignError > > {
274
- let skip_signature = self . account . is_signer_interactive ( ) ;
275
+ let skip_signature = self
276
+ . account
277
+ . is_signer_interactive ( SignerInteractivityContext :: Execution { calls : & self . calls } ) ;
275
278
276
279
let prepared = PreparedExecutionV1 {
277
280
account : self . account ,
@@ -309,7 +312,10 @@ where
309
312
skip_validate : bool ,
310
313
skip_fee_charge : bool ,
311
314
) -> Result < SimulatedTransaction , AccountError < A :: SignError > > {
312
- let skip_signature = if self . account . is_signer_interactive ( ) {
315
+ let skip_signature = if self
316
+ . account
317
+ . is_signer_interactive ( SignerInteractivityContext :: Execution { calls : & self . calls } )
318
+ {
313
319
// If signer is interactive, we would try to minimize signing requests. However, if the
314
320
// caller has decided to not skip validation, it's best we still request a real
315
321
// signature, as otherwise the simulation would most likely fail.
@@ -498,7 +504,9 @@ where
498
504
& self ,
499
505
nonce : Felt ,
500
506
) -> Result < FeeEstimate , AccountError < A :: SignError > > {
501
- let skip_signature = self . account . is_signer_interactive ( ) ;
507
+ let skip_signature = self
508
+ . account
509
+ . is_signer_interactive ( SignerInteractivityContext :: Execution { calls : & self . calls } ) ;
502
510
503
511
let prepared = PreparedExecutionV3 {
504
512
account : self . account ,
@@ -537,7 +545,10 @@ where
537
545
skip_validate : bool ,
538
546
skip_fee_charge : bool ,
539
547
) -> Result < SimulatedTransaction , AccountError < A :: SignError > > {
540
- let skip_signature = if self . account . is_signer_interactive ( ) {
548
+ let skip_signature = if self
549
+ . account
550
+ . is_signer_interactive ( SignerInteractivityContext :: Execution { calls : & self . calls } )
551
+ {
541
552
// If signer is interactive, we would try to minimize signing requests. However, if the
542
553
// caller has decided to not skip validation, it's best we still request a real
543
554
// signature, as otherwise the simulation would most likely fail.
0 commit comments