Skip to content

Commit

Permalink
Merge pull request #1894 from argentlabs/hotfix/zod-execute-txn
Browse files Browse the repository at this point in the history
Hotfix/zod-execute-txn
  • Loading branch information
dhruvkelawala authored Mar 9, 2023
2 parents 5eefa11 + a2e8dd4 commit bf67142
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/window/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import { InvokeFunctionResponse, Signature } from "starknet"
import { z } from "zod"

const bignumberishSchema = z.union([z.string(), z.number(), z.bigint()])

const callSchema = z.object({
contractAddress: z.string(),
entrypoint: z.string(),
calldata: z.array(z.string()).optional(),
calldata: z.array(bignumberishSchema).optional(),
})

const bignumberishSchema = z.union([
z.string().regex(/^0x[0-9a-fA-F]+$/),
z.number(),
z.bigint(),
])

export const typedDataSchema = z.object({
types: z.record(
z.array(
Expand Down

0 comments on commit bf67142

Please sign in to comment.