Skip to content

Commit

Permalink
fix: fix createKernelAccountClient type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SahilVasava committed Apr 25, 2024
1 parent be09f59 commit 1f6b8a0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @zerodev/sdk

## 5.2.10

### Patch Changes

- Fixed createKernelAccountClient return type issue

## 5.2.9

### Patch Changes
Expand Down
8 changes: 5 additions & 3 deletions packages/core/clients/decorators/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ export type KernelAccountClientActions<
>
}

export const kernelAccountClientActions =
<entryPoint extends EntryPoint>({ middleware }: Middleware<entryPoint>) =>
<
export function kernelAccountClientActions<entryPoint extends EntryPoint>({
middleware
}: Middleware<entryPoint>) {
return <
TTransport extends Transport,
TChain extends Chain | undefined = Chain | undefined,
TSmartAccount extends KernelSmartAccount<entryPoint> | undefined =
Expand All @@ -111,3 +112,4 @@ export const kernelAccountClientActions =
),
getUserOperationGasPrice: async () => getUserOperationGasPrice(client)
})
}
14 changes: 6 additions & 8 deletions packages/core/clients/kernelAccountClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ export type KernelAccountClient<
account extends KernelSmartAccount<entryPoint> | undefined =
| KernelSmartAccount<entryPoint>
| undefined
> = Prettify<
Client<
transport,
chain,
account,
BundlerRpcSchema<entryPoint>,
KernelAccountClientActions<entryPoint, chain, account>
>
> = Client<
transport,
chain,
account,
BundlerRpcSchema<entryPoint>,
KernelAccountClientActions<entryPoint, chain, account>
>

export type SmartAccountClientConfig<
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zerodev/sdk",
"version": "5.2.9",
"version": "5.2.10",
"author": "ZeroDev",
"main": "./_cjs/index.js",
"module": "./_esm/index.js",
Expand Down

0 comments on commit 1f6b8a0

Please sign in to comment.