@@ -42,8 +42,6 @@ pub fn to_broadcasted_starknet_transaction(
42
42
transaction : & TransactionSigned ,
43
43
signer_starknet_address : Felt ,
44
44
) -> Result < BroadcastedInvokeTransaction , eyre:: Error > {
45
- let nonce = Felt :: from ( transaction. nonce ( ) ) ;
46
-
47
45
let mut bytes = BytesMut :: new ( ) ;
48
46
transaction. transaction . encode_without_signature ( & mut bytes) ;
49
47
@@ -52,13 +50,10 @@ pub fn to_broadcasted_starknet_transaction(
52
50
#[ cfg( feature = "v0" ) ]
53
51
{
54
52
use crate :: evm_sequencer:: account:: pack_byte_array_to_starkfelt_array;
55
- let bytes_u8: Vec < u8 > = bytes. into_iter ( ) . collect ( ) ;
56
- let bytes_len = bytes_u8. len ( ) ;
57
- let packed_data: Vec < _ > = pack_byte_array_to_starkfelt_array ( bytes_u8. as_slice ( ) )
58
- . map ( Felt :: from)
59
- . collect ( ) ;
60
- std:: iter:: once ( Felt :: from ( bytes_len) )
61
- . chain ( packed_data)
53
+ std:: iter:: once ( ( bytes. len ( ) ) . into ( ) )
54
+ . chain ( pack_byte_array_to_starkfelt_array (
55
+ & bytes. into_iter ( ) . collect :: < Vec < u8 > > ( ) ,
56
+ ) )
62
57
. collect ( )
63
58
}
64
59
#[ cfg( not( feature = "v0" ) ) ]
@@ -115,7 +110,7 @@ pub fn to_broadcasted_starknet_transaction(
115
110
let request = BroadcastedInvokeTransaction :: V1 ( BroadcastedInvokeTransactionV1 {
116
111
max_fee : Felt :: ZERO ,
117
112
signature,
118
- nonce,
113
+ nonce : transaction . nonce ( ) . into ( ) ,
119
114
sender_address : signer_starknet_address,
120
115
calldata : execute_calldata,
121
116
is_query : false ,
0 commit comments