Skip to content

Commit e461856

Browse files
committed
fix: add more timeout functions
hopefully helps ci tests
1 parent ff4e812 commit e461856

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/auth-server/pages/recovery/guardian/(actions)/confirm-guardian.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,14 @@ const confirmGuardianAction = async () => {
288288
if (isConnectedSsoGuardian.value) {
289289
// User is logged in as the guardian SSO account - use SSO client with paymaster
290290
confirmationState.value = "getting_sso_client";
291-
client = (await getConfigurableAccount({ address: guardianAddress.value, usePaymaster: true }))!;
291+
292+
// Add timeout to prevent hanging in CI environments (30s to account for slower RPC)
293+
const clientPromise = getConfigurableAccount({ address: guardianAddress.value, usePaymaster: true });
294+
const timeoutPromise = new Promise<never>((_, reject) =>
295+
setTimeout(() => reject(new Error("Timeout getting SSO client after 30 seconds")), 30000),
296+
);
297+
298+
client = (await Promise.race([clientPromise, timeoutPromise]))!;
292299
confirmationState.value = "got_sso_client";
293300
} else {
294301
// User needs to connect with wallet (either not logged in or using different account)

0 commit comments

Comments
 (0)