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]: linkMode not working after connecting wallet #301

Open
putti-johnnie opened this issue Jan 17, 2025 · 2 comments
Open

[bug]: linkMode not working after connecting wallet #301

putti-johnnie opened this issue Jan 17, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@putti-johnnie
Copy link

Description

Actually, there are 2 issues:

  • when a MetaMask wallet is successfully connected, it does not go back to my dapp.
  • I am using const { data: walletClient } = useWalletClient(); to monitor the wallet status, but it doesn't get updated once the wallet is connected.
    As you can see from the attached video, once I go back to my app manually, it doesn't show the address until I refresh the entire app.

BTW, I can confirm the universal link is working properly.

AppKit SDK version

"@reown/appkit-wagmi-react-native": "^1.1.1",

Output of npx react-native info

System:
  OS: macOS 15.0.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 1.33 GB / 18.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.2
    path: ~/.nvm/versions/node/v18.18.2/bin/node
  Yarn:
    version: 3.6.1
    path: ~/.nvm/versions/node/v18.18.2/bin/yarn
  npm:
    version: 10.9.0
    path: ~/.nvm/versions/node/v18.18.2/bin/npm
  Watchman:
    version: 2024.11.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 34.0.0
      - 35.0.0
      - 35.0.0
    System Images:
      - android-22 | ARM 64 v8a
      - android-22 | Google APIs ARM 64 v8a
      - android-28 | Google ARM64-V8a Play ARM 64 v8a
      - android-29 | Google Play ARM 64 v8a
      - android-31 | Google Play ARM 64 v8a
      - android-32 | Google Play ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
      - android-TiramisuPrivacySandbox | Google Play Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10227.8.2321.11479570
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /usr/bin/javac
  Ruby:
    version: 3.3.6
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: latest
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.6
    wanted: 0.76.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Expo Version (if applies)

"expo": "~52.0.25"

Steps to reproduce

  • call await open(); // from const { open } = useAppKit()
  • select MetaMask to connect wallet
  • successful connect wallet in MetaMask app
  • not navigate back to my app

Snack, code example, screenshot, or link to a repository

wagmi config:

    const metadata = {
        name: 'Johnnie test',
        description: 'playground app',
        url: 'https://my-domain',
        icons: ['https://avatars.githubusercontent.com/u/179229932'],
        redirect: {
            native: 'johnnietest://',
            universal: 'https://****/appkit', // masked domain
            linkMode: true,
        },
    }

    const chains = [mainnet, polygon, arbitrum] as const

    wagmiConfig = defaultWagmiConfig({ chains, projectId, metadata })

    createAppKit({
        projectId,
        wagmiConfig,
        defaultChain: mainnet,
        enableAnalytics: false,
    })

video:

ScreenRecording_01-17-2025.19-48-08_1.mov
@putti-johnnie putti-johnnie added the bug Something isn't working label Jan 17, 2025
@ignaciosantise
Copy link
Collaborator

hey @putti-johnnie 👋 Which version of MetaMask are you using? Are you using the latest? Also, does the redirect work in Trust Wallet?

@putti-johnnie
Copy link
Author

@ignaciosantise Yes, I am using the latest MetaMask from AppStore.
And it's not working for Trust wallet either.

Maybe I missed some config? Do I need any additional setup in the project dashboard except the iOS Bundle IDs?

@reown-com reown-com deleted a comment from whatcher5 Jan 18, 2025
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

2 participants