Skip to content

Commit 37f3dad

Browse files
committed
refactor(e2e): simplify waitForExtensions function by removing unnecessary whitespace and improving readability
1 parent 004716f commit 37f3dad

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

e2e-tests/runner/examples/connectors/PhantomSolanaConnector/utils/waitForExtensions.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,23 @@ export async function waitForExtensions(
1717
if (!extensions || typeof extensions !== 'object') {
1818
throw new Error('Invalid extensions object provided.');
1919
}
20-
2120
console.log(`Checking extensions (Attempt ${attempt + 1}/${maxAttempts})...`);
2221
const pages = context.pages();
23-
2422
if (!pages.length) {
2523
console.warn('No pages found in the context. Retrying...');
2624
}
27-
2825
const phantomPage = pages.find((page) =>
2926
page.url().includes(extensions.phantom?.id),
3027
);
31-
3228
if (phantomPage) {
3329
console.log('Phantom extension is ready!');
3430
return true;
3531
}
36-
3732
if (attempt >= maxAttempts - 1) {
3833
throw new Error(
3934
`Failed to detect extensions after ${maxAttempts} attempts.`,
4035
);
4136
}
42-
4337
console.log('Phantom extension not found. Retrying in 3 seconds...');
4438
await setTimeout(3000);
4539
return waitForExtensions(context, extensions, maxAttempts, attempt + 1);

0 commit comments

Comments
 (0)