Skip to content

Commit ede916f

Browse files
authored
fix: throw if address for chainId is missing for wagmi(#704)
Signed-off-by: Ocheretovich Oksana <ocheretovich@gmail.com>
1 parent f4e1d7e commit ede916f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/wagmi-generator/resolveProxyContracts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ function getAddress(
2323
if (typeof address == "string") {
2424
return address as Address;
2525
} else {
26-
return address[chainId];
26+
const resolved = address[chainId];
27+
if (!resolved) throw new Error(`Address not found for chainId ${chainId}`);
28+
return resolved;
2729
}
2830
}
2931

0 commit comments

Comments
 (0)