@@ -1348,13 +1348,6 @@ pub fn convert_to_anvil_receipt(receipt: AnyTransactionReceipt) -> Option<Receip
13481348
13491349impl FromRecoveredTx < TypedTransaction > for TxEnv {
13501350 fn from_recovered_tx ( tx : & TypedTransaction , caller : Address ) -> Self {
1351- fn transact_to ( kind : & TxKind ) -> TxKind {
1352- match kind {
1353- TxKind :: Call ( c) => TxKind :: Call ( * c) ,
1354- TxKind :: Create => TxKind :: Create ,
1355- }
1356- }
1357-
13581351 match tx {
13591352 TypedTransaction :: Legacy ( signed_tx) => Self :: from_recovered_tx ( signed_tx. tx ( ) , caller) ,
13601353 TypedTransaction :: EIP2930 ( signed_tx) => Self :: from_recovered_tx ( signed_tx. tx ( ) , caller) ,
@@ -1363,24 +1356,7 @@ impl FromRecoveredTx<TypedTransaction> for TxEnv {
13631356 Self :: from_recovered_tx ( signed_tx. tx ( ) . tx ( ) , caller)
13641357 }
13651358 TypedTransaction :: EIP7702 ( signed_tx) => Self :: from_recovered_tx ( signed_tx. tx ( ) , caller) ,
1366- TypedTransaction :: Deposit ( tx) => {
1367- let TxDeposit { to, value, gas_limit, input, .. } = tx;
1368-
1369- Self {
1370- caller,
1371- kind : transact_to ( to) ,
1372- data : input. clone ( ) ,
1373- chain_id : tx. chain_id ( ) ,
1374- nonce : 0 ,
1375- value : * value,
1376- gas_price : 0 ,
1377- gas_priority_fee : None ,
1378- gas_limit : * gas_limit,
1379- access_list : vec ! [ ] . into ( ) ,
1380- tx_type : DEPOSIT_TX_TYPE_ID ,
1381- ..Default :: default ( )
1382- }
1383- }
1359+ TypedTransaction :: Deposit ( tx) => Self :: from_recovered_tx ( tx, caller) ,
13841360 }
13851361 }
13861362}
0 commit comments