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

'Play using your wallet' is being highlighted using the desktop launcher #184

Open
kuruk-mm opened this issue Apr 13, 2022 · 0 comments
Open
Labels
bug Something isn't working stream-core

Comments

@kuruk-mm
Copy link
Member

kuruk-mm commented Apr 13, 2022

This happens when you are connected with Wallet Connect.

image

Reproduction steps:

  • Connect with Wallet Connect using the Launcher
  • Close the Launcher
  • Open the Launcher again... you will see that the 'Play using your wallet' is highlighted

In Desktop, we have different behaviour from Web. Even if you have a saved session. You must press a button. So basically, we disabled the auto-login.

I suspect that I added this bug when I implemented the desktop launcher.

And the problem could be in this code:

async function initLogin(kernel: KernelResult) {
  if (!isElectron()) {
    const provider = await restoreConnection()
    if (provider && provider.account) {
      const providerChainId = await getChainIdFromProvider(provider.provider)

      // BUG OF decentraland-connect:
      // provider.chainId DOES NOT reflect the selected chain in the real provider
      const storedSession = await kernel.hasStoredSession(provider.account, providerChainId /* provider.chainId */)

      if (storedSession) {
        track('automatic_relogin', { provider_type: provider.providerType })
        authenticate(provider.providerType).catch(defaultWebsiteErrorTracker)
      }
    }
  }
}

Permalink:

if (!isElectron()) {

@2fd 2fd added the bug Something isn't working label Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stream-core
Projects
None yet
Development

No branches or pull requests

4 participants