Skip to content

Commit

Permalink
fix: argent webwallet window types
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Jun 4, 2024
1 parent 7992c4a commit d706f88
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/types/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || [],
},
)
Expand Down

0 comments on commit d706f88

Please sign in to comment.