Skip to content

Commit

Permalink
fix: typecasting
Browse files Browse the repository at this point in the history
  • Loading branch information
rin-st committed Dec 11, 2024
1 parent 44ded30 commit b39b93f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/nextjs/hooks/scaffold-eth/useScaffoldContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const useScaffoldContract = <
walletClient?: TWalletClient | null;
chainId?: AllowedChainIds;
}) => {
const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds);
const selectedNetwork = useSelectedNetwork(chainId);
const { data: deployedContractData, isLoading: deployedContractLoading } = useDeployedContractInfo({
contractName,
chainId: selectedNetwork?.id as AllowedChainIds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const useScaffoldEventHistory = <
watch,
enabled = true,
}: UseScaffoldEventHistoryConfig<TContractName, TEventName, TBlockData, TTransactionData, TReceiptData>) => {
const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds);
const selectedNetwork = useSelectedNetwork(chainId);

const publicClient = usePublicClient({
chainId: selectedNetwork.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const useScaffoldReadContract = <
chainId,
...readConfig
}: UseScaffoldReadConfig<TContractName, TFunctionName>) => {
const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds);
const selectedNetwork = useSelectedNetwork(chainId);
const { data: deployedContract } = useDeployedContractInfo({
contractName,
chainId: selectedNetwork.id as AllowedChainIds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const useScaffoldWatchContractEvent = <
chainId,
onLogs,
}: UseScaffoldEventConfig<TContractName, TEventName>) => {
const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds);
const selectedNetwork = useSelectedNetwork(chainId);
const { data: deployedContractData } = useDeployedContractInfo({
contractName,
chainId: selectedNetwork.id as AllowedChainIds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const useScaffoldWriteContract = <TContractName extends ContractName>({

const wagmiContractWrite = useWriteContract(writeContractParams);

const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds);
const selectedNetwork = useSelectedNetwork(chainId);

const { data: deployedContractData } = useDeployedContractInfo({
contractName,
Expand Down

0 comments on commit b39b93f

Please sign in to comment.