@@ -522,7 +522,6 @@ export class RpcChannel {
522
522
resource_bounds : details . resourceBounds ,
523
523
tip : toHex ( details . tip ) ,
524
524
paymaster_data : details . paymasterData . map ( ( it ) => toHex ( it ) ) ,
525
- account_deployment_data : details . accountDeploymentData . map ( ( it ) => toHex ( it ) ) ,
526
525
nonce_data_availability_mode : details . nonceDataAvailabilityMode ,
527
526
fee_data_availability_mode : details . feeDataAvailabilityMode ,
528
527
} ,
@@ -607,13 +606,7 @@ export class RpcChannel {
607
606
paymaster_data : invocation . paymasterData . map ( ( it ) => toHex ( it ) ) ,
608
607
nonce_data_availability_mode : invocation . nonceDataAvailabilityMode ,
609
608
fee_data_availability_mode : invocation . feeDataAvailabilityMode ,
610
-
611
- // dont add account_deployment_data if invocation.type === TransactionType.DEPLOY_ACCOUNT
612
- ...( invocation . type === TransactionType . DEPLOY_ACCOUNT
613
- ? { }
614
- : {
615
- account_deployment_data : invocation . accountDeploymentData . map ( ( it ) => toHex ( it ) ) ,
616
- } ) ,
609
+ account_deployment_data : invocation . accountDeploymentData . map ( ( it ) => toHex ( it ) ) ,
617
610
} ;
618
611
}
619
612
@@ -652,14 +645,16 @@ export class RpcChannel {
652
645
} as RPC . SPEC . BROADCASTED_DECLARE_TXN ;
653
646
}
654
647
if ( invocation . type === TransactionType . DEPLOY_ACCOUNT ) {
648
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
649
+ const { account_deployment_data, ...restDetails } = details ;
655
650
// v1 v3
656
651
return {
657
652
type : invocation . type ,
658
653
constructor_calldata : CallData . toHex ( invocation . constructorCalldata || [ ] ) ,
659
654
class_hash : toHex ( invocation . classHash ) ,
660
655
contract_address_salt : toHex ( invocation . addressSalt || 0 ) ,
661
656
version : toHex ( invocation . version || defaultVersions . v3 ) as RPC . SPEC . INVOKE_TXN [ 'version' ] ,
662
- ...details ,
657
+ ...restDetails ,
663
658
} as RPC . SPEC . BROADCASTED_DEPLOY_ACCOUNT_TXN ;
664
659
}
665
660
throw Error ( 'RPC buildTransaction received unknown TransactionType' ) ;
0 commit comments