From f48a96e4d9262b0829493d77fd501b18e6697d77 Mon Sep 17 00:00:00 2001 From: enesozturk Date: Tue, 6 Aug 2024 12:51:21 +0300 Subject: [PATCH 1/2] fix: trigger adapters at watchStandard initialization --- packages/solana/src/utils/wallet-standard/watchStandard.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/solana/src/utils/wallet-standard/watchStandard.ts b/packages/solana/src/utils/wallet-standard/watchStandard.ts index b22e44b245..383b5fdf30 100644 --- a/packages/solana/src/utils/wallet-standard/watchStandard.ts +++ b/packages/solana/src/utils/wallet-standard/watchStandard.ts @@ -25,6 +25,8 @@ export function watchStandard(callback: (arg: StandardWalletAdapter[]) => void) }) ] + callback(standardAdapters) + return () => listeners.forEach(off => off()) } From 9a07a01ddc1e54cf30d75ad868788affa678d335 Mon Sep 17 00:00:00 2001 From: enesozturk Date: Tue, 6 Aug 2024 13:04:40 +0300 Subject: [PATCH 2/2] chore: add tests to make sure MM is visible on Solana --- apps/laboratory/tests/metamask.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/laboratory/tests/metamask.spec.ts b/apps/laboratory/tests/metamask.spec.ts index 4a8d781b05..73e66e60a1 100644 --- a/apps/laboratory/tests/metamask.spec.ts +++ b/apps/laboratory/tests/metamask.spec.ts @@ -20,3 +20,10 @@ synpressTest('should be connected as expected', async ({ page, metamask }) => { await metamask.connectToDapp() await modalValidator.expectConnected() }) + +synpressTest('should show injected connectors on Solana as expected', async ({ page }) => { + await page.goto(`/library/solana`) + await page.getByTestId('connect-button').click() + const connectMetaMaskButton = page.getByTestId('wallet-selector-MetaMask') + await expect(connectMetaMaskButton).toBeVisible() +})