Skip to content

Commit e3b402d

Browse files
authored
Merge branch 'main' into wallets-overview
2 parents 463e4e7 + 67c3d86 commit e3b402d

File tree

15 files changed

+540
-186
lines changed

15 files changed

+540
-186
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/_components/getContractCreator.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,23 @@ export async function getContractCreator(
99
contract: ThirdwebContract,
1010
functionSelectors: string[],
1111
) {
12-
if (isOwnerSupported(functionSelectors)) {
13-
return owner({
14-
contract,
15-
});
16-
}
12+
try {
13+
if (isOwnerSupported(functionSelectors)) {
14+
return await owner({
15+
contract,
16+
});
17+
}
1718

18-
if (isGetRoleAdminSupported(functionSelectors)) {
19-
return getRoleMember({
20-
contract,
21-
index: BigInt(0),
22-
role: "admin",
23-
});
24-
}
19+
if (isGetRoleAdminSupported(functionSelectors)) {
20+
return await getRoleMember({
21+
contract,
22+
index: BigInt(0),
23+
role: "admin",
24+
});
25+
}
2526

26-
return null;
27+
return null;
28+
} catch {
29+
return null;
30+
}
2731
}

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/client/auth-options-form.client.tsx

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -231,22 +231,24 @@ export function AuthOptionsForm({
231231
}
232232

233233
let smartAccountOptions: Ecosystem["smartAccountOptions"] | null = null;
234-
if (data.useSmartAccount && data.executionMode === "EIP4337") {
235-
let accountFactoryAddress: string;
236-
switch (data.accountFactoryType) {
237-
case "v0.6":
238-
accountFactoryAddress = DEFAULT_ACCOUNT_FACTORY_V0_6;
239-
break;
240-
case "v0.7":
241-
accountFactoryAddress = DEFAULT_ACCOUNT_FACTORY_V0_7;
242-
break;
243-
case "custom":
244-
if (!data.customAccountFactoryAddress) {
245-
toast.error("Please enter a custom account factory address");
246-
return;
247-
}
248-
accountFactoryAddress = data.customAccountFactoryAddress;
249-
break;
234+
if (data.useSmartAccount) {
235+
let accountFactoryAddress: string | undefined;
236+
if (data.executionMode === "EIP4337") {
237+
switch (data.accountFactoryType) {
238+
case "v0.6":
239+
accountFactoryAddress = DEFAULT_ACCOUNT_FACTORY_V0_6;
240+
break;
241+
case "v0.7":
242+
accountFactoryAddress = DEFAULT_ACCOUNT_FACTORY_V0_7;
243+
break;
244+
case "custom":
245+
if (!data.customAccountFactoryAddress) {
246+
toast.error("Please enter a custom account factory address");
247+
return;
248+
}
249+
accountFactoryAddress = data.customAccountFactoryAddress;
250+
break;
251+
}
250252
}
251253

252254
smartAccountOptions = {

0 commit comments

Comments
 (0)