Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpm-12 authored and kanej committed Dec 13, 2024
1 parent caa49e5 commit 027cec2
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/hardhat-plugin-viem/src/viem-ignition-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,12 @@ export class ViemIgnitionHelper {
deployedContract: { address: string },
chain?: Chain
): Promise<GetContractReturnType> {
const publicClient = await hre.viem.getPublicClient({ chain });
const [walletClient] = await hre.viem.getWalletClients({ chain });
const publicClient = await hre.viem.getPublicClient(
chain ? { chain } : undefined
);
const [walletClient] = await hre.viem.getWalletClients(
chain ? { chain } : undefined
);

if (walletClient === undefined) {
throw new HardhatPluginError(
Expand All @@ -278,8 +282,12 @@ export class ViemIgnitionHelper {
deployedContract: { address: string },
chain?: Chain
): Promise<GetContractReturnType> {
const publicClient = await hre.viem.getPublicClient({ chain });
const [walletClient] = await hre.viem.getWalletClients({ chain });
const publicClient = await hre.viem.getPublicClient(
chain ? { chain } : undefined
);
const [walletClient] = await hre.viem.getWalletClients(
chain ? { chain } : undefined
);

if (walletClient === undefined) {
throw new HardhatPluginError(
Expand Down

0 comments on commit 027cec2

Please sign in to comment.