Skip to content

Commit

Permalink
feat: add zod runtime validation for simple account (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
avasisht23 committed Nov 3, 2023
1 parent ea85c96 commit f14016f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/core/src/account/__tests__/simple.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import type { Address } from "viem";
<<<<<<< HEAD
import { polygonMumbai, sepolia, type Chain } from "viem/chains";
=======
import { polygonMumbai, type Chain } from "viem/chains";
>>>>>>> 1c5e368 (feat: add zod runtime validation for base account (#186))
import { describe, it } from "vitest";
import { getDefaultSimpleAccountFactoryAddress } from "../../index.js";
import { SmartAccountProvider } from "../../provider/base.js";
Expand Down
8 changes: 8 additions & 0 deletions packages/core/src/account/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ export const SimpleSmartAccountParamsSchema = <
owner: SignerSchema,
index: z.bigint().optional(),
});

export const SimpleSmartAccountParamsSchema = <
TTransport extends SupportedTransports = Transport
>() =>
createBaseSmartAccountParamsSchema<TTransport>().extend({
owner: SignerSchema,
index: z.bigint().optional(),
});

0 comments on commit f14016f

Please sign in to comment.