From 00c58e3c6d03b716b68c1b96b5a4adc1cff87dd0 Mon Sep 17 00:00:00 2001 From: Janek Date: Thu, 7 Dec 2023 16:41:55 +0100 Subject: [PATCH] fix(beta): deploy account (#880) --- src/channel/rpc_0_6.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/channel/rpc_0_6.ts b/src/channel/rpc_0_6.ts index edf2dfbc8..c5bc76193 100644 --- a/src/channel/rpc_0_6.ts +++ b/src/channel/rpc_0_6.ts @@ -605,9 +605,15 @@ export class RpcChannel { resource_bounds: invocation.resourceBounds, tip: toHex(invocation.tip), paymaster_data: invocation.paymasterData.map((it) => toHex(it)), - account_deployment_data: invocation.accountDeploymentData.map((it) => toHex(it)), nonce_data_availability_mode: invocation.nonceDataAvailabilityMode, fee_data_availability_mode: invocation.feeDataAvailabilityMode, + + // dont add account_deployment_data if invocation.type === TransactionType.DEPLOY_ACCOUNT + ...(invocation.type === TransactionType.DEPLOY_ACCOUNT + ? {} + : { + account_deployment_data: invocation.accountDeploymentData.map((it) => toHex(it)), + }), }; }