Skip to content

Commit

Permalink
Merge pull request #105 from argentlabs/fix/webwallet-window-types
Browse files Browse the repository at this point in the history
fix: argent webwallet window types
  • Loading branch information
bluecco authored Jun 4, 2024
2 parents 7992c4a + d706f88 commit 0462499
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 0462499

Please sign in to comment.