From 75314ecf91c6e8f5e7dd4414f3068a4cda38e3fc Mon Sep 17 00:00:00 2001 From: Don <100505855+DonFungible@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:52:11 -0800 Subject: [PATCH] add type --- hooks/useStoryClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/useStoryClient.ts b/hooks/useStoryClient.ts index 6060fd3..aeaca12 100644 --- a/hooks/useStoryClient.ts +++ b/hooks/useStoryClient.ts @@ -2,7 +2,7 @@ import { Client, ReadOnlyClient, StoryClient, StoryConfig, StoryReadOnlyConfig } from '@story-protocol/core-sdk'; import { useWalletClient } from 'wagmi'; import { custom, http } from 'viem'; -import { sepolia } from 'viem/chains'; +import { Chain, sepolia } from 'viem/chains'; type EthereumProvider = { request(): Promise }; @@ -11,7 +11,7 @@ export function useStoryClient(): { client: ReadOnlyClient | Client } { if (typeof window !== 'undefined' && window?.ethereum && walletClient) { const config: StoryConfig = { - chain: sepolia, + chain: sepolia as Chain, transport: walletClient ? custom(window.ethereum as EthereumProvider) : http(process.env.NEXT_PUBLIC_RPC_PROVIDER_URL),