Skip to content

Commit

Permalink
fix(solana): injected connectors not detected (#2656)
Browse files Browse the repository at this point in the history
  • Loading branch information
enesozturk authored Aug 7, 2024
1 parent 949cb62 commit 605273d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/laboratory/tests/metamask.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
2 changes: 2 additions & 0 deletions packages/solana/src/utils/wallet-standard/watchStandard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export function watchStandard(callback: (arg: StandardWalletAdapter[]) => void)
})
]

callback(standardAdapters)

return () => listeners.forEach(off => off())
}

Expand Down

0 comments on commit 605273d

Please sign in to comment.