[Bug] MetaMaskSDK `extensionOnly: true` breaks the connecting to MetaMask
Current Behavior
When using MetaMaskSDK with extensionOnly: false works as expected it opens MetaMask Modal to connect which works fine. But on desktop(with browser extention) need to click on desktop and than one more button even if previously connected.
This is supposed to be solved by extensionOnly: true but doing this breaks it without any error just not able to connect with MetaMask at all.
Expected Behavior
Expected behavior is to connect browser wallet if already previously connected and unlocked.
Steps To Reproduce
Use this MetaMask SDK config
import Onboard from '@web3-onboard/core'
import MetaMaskModule from '@web3-onboard/metamask'
import InjectedModule from '@web3-onboard/injected-wallets'
const injected = InjectedModule({ displayUnavailable: ['MetaMask', 'Core'], })
const metamask = MetaMaskModule({
options: {
extensionOnly: true,
dappMetadata: {
name: 'My Test DApp',
},
},
})
const onboard = Onboard({
wallets: [metamask, injected ], // other wallets
[chains],
appMetadata: {
name: 'My Test DApp',
icon: '', // svg string icon
description: 'my test app',
recommendedInjectedWallets: [{ name: 'MetaMask', url: 'https://metamask.io' }],
explore: 'dapp url',
},
disableFontDownload: true,
connect: { autoConnectLastWallet: true, disableUDResolution: true },
accountCenter: { desktop: { enabled: false }, mobile: { enabled: false } },
})
Ignore typo here if any
What package is effected by this issue?
@web3-onboard/core
Is this a build or a runtime issue?
Build, Runtime
Package Version
2.24.18
Node Version
20
What browsers are you seeing the problem on?
Chrome, Microsoft Edge
Relevant log output
No response
Anything else?
No response
Sanity Check
- [X] If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
@itsmnthn this is a known issue and we will be following up with the MetaMask team for assistance