Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] MetaMaskSDK extensionOnly: true breaks the connecting to MetaMask #2035

Open
1 task done
itsmnthn opened this issue Dec 30, 2023 · 1 comment
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@itsmnthn
Copy link
Contributor

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

  • 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 itsmnthn added the bug Something isn't working label Dec 30, 2023
@Adamj1232
Copy link
Member

@itsmnthn this is a known issue and we will be following up with the MetaMask team for assistance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants