From d706f88783df7bf2a5e4cdfbe706b8849344b1ba Mon Sep 17 00:00:00 2001 From: bluecco Date: Tue, 4 Jun 2024 13:43:51 +0200 Subject: [PATCH] fix: argent webwallet window types --- src/types/window.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/types/window.ts b/src/types/window.ts index bb201f2..212ed1a 100644 --- a/src/types/window.ts +++ b/src/types/window.ts @@ -229,22 +229,22 @@ const OFFCHAIN_SESSION_ENTRYPOINT = "use_offchain_session" export const RpcCallSchema = z .object({ contract_address: z.string(), - entrypoint: z.string(), + entry_point: z.string(), calldata: z.array(BigNumberishSchema).optional(), offchainSessionDetails: OffchainSessionDetailsSchema.optional(), }) .transform( - ({ contract_address, entrypoint, calldata, offchainSessionDetails }) => - entrypoint === OFFCHAIN_SESSION_ENTRYPOINT + ({ contract_address, entry_point, calldata, offchainSessionDetails }) => + entry_point === OFFCHAIN_SESSION_ENTRYPOINT ? { contractAddress: contract_address, - entrypoint, + entrypoint: entry_point, calldata: calldata || [], offchainSessionDetails: offchainSessionDetails || undefined, } : { contractAddress: contract_address, - entrypoint, + entrypoint: entry_point, calldata: calldata || [], }, )