Skip to content

Commit

Permalink
improves type precision
Browse files Browse the repository at this point in the history
  • Loading branch information
douglance committed Dec 27, 2023
1 parent fc64f77 commit e0b2cf0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/orbitClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, PublicClient, PublicClientConfig, createPublicClient } from 'viem';
import { PublicClient, PublicClientConfig, createPublicClient } from 'viem';
import { rollupCreator } from './contracts';
import { ParentChainId, validParentChainId } from './types/ParentChain';

Expand All @@ -7,7 +7,7 @@ export interface OrbitClient extends PublicClient {
getValidChainId(): ParentChainId;
}

const validateClientChainId = (client: Client) => {
const validateClientChainId = (client: PublicClient) => {
const chainId = client.chain?.id;
if (!validParentChainId(chainId)) {
throw new Error('chainId is undefined');
Expand All @@ -19,7 +19,7 @@ export function createOrbitClient({ chain, transport }: PublicClientConfig): Orb
return createPublicClient({
chain,
transport,
}).extend((client: Client) => ({
}).extend((client: PublicClient) => ({
getRollupCreatorAddress: () => {
const chainId = validateClientChainId(client);
return rollupCreator.address[chainId];
Expand Down

0 comments on commit e0b2cf0

Please sign in to comment.