Skip to content

Commit 621357a

Browse files
committed
[TOOL-3635] Dashboard: Fix AA factories page crash (#6428)
1 parent 0527ee2 commit 621357a

File tree

1 file changed

+13
-9
lines changed
  • apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/account-abstraction/factories

1 file changed

+13
-9
lines changed

apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/account-abstraction/factories/page.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,23 @@ async function AsyncYourFactories(props: {
115115
authToken: props.authToken,
116116
});
117117

118-
const client = getThirdwebClient();
118+
const client = getThirdwebClient(props.authToken);
119119

120120
const factories = (
121121
await Promise.all(
122122
deployedContracts.map(async (c) => {
123-
const contract = getContract({
124-
// eslint-disable-next-line no-restricted-syntax
125-
chain: defineChain(Number(c.chainId)),
126-
address: c.contractAddress,
127-
client,
128-
});
129-
const m = await getCompilerMetadata(contract);
130-
return m.name.indexOf("AccountFactory") > -1 ? c : null;
123+
try {
124+
const contract = getContract({
125+
// eslint-disable-next-line no-restricted-syntax
126+
chain: defineChain(Number(c.chainId)),
127+
address: c.contractAddress,
128+
client,
129+
});
130+
const m = await getCompilerMetadata(contract);
131+
return m.name.indexOf("AccountFactory") > -1 ? c : null;
132+
} catch {
133+
return null;
134+
}
131135
}),
132136
)
133137
).filter((f) => f !== null);

0 commit comments

Comments
 (0)