Skip to content

Commit

Permalink
add type
Browse files Browse the repository at this point in the history
  • Loading branch information
DonFungible committed Dec 9, 2023
1 parent cd2f26b commit 75314ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/useStoryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> };

Expand All @@ -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),
Expand Down

0 comments on commit 75314ec

Please sign in to comment.