-
Notifications
You must be signed in to change notification settings - Fork 21
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
Comments
hey @putti-johnnie 👋 Which version of MetaMask are you using? Are you using the latest? Also, does the redirect work in Trust Wallet? |
@ignaciosantise Yes, I am using the latest MetaMask from AppStore. Maybe I missed some config? Do I need any additional setup in the project dashboard except the iOS Bundle IDs? |
@putti-johnnie maybe your project doesn't have deep-links enabled. Here's the official guide to enable them: https://reactnative.dev/docs/linking#enabling-deep-links |
@ignaciosantise hmm... I am pretty sure the unniversal link is working on iOS. I have other feature working with universal link. |
@putti-johnnie the config seems okey 🤔 can you provide a fresh project where i can repro the issue? |
@ignaciosantise I can try to prepare a fresh project. Meanwhile, could you please check my other issue? |
@putti-johnnie you can use import { useAccount } from 'wagmi';
...
const { address } = useAccount(); |
@ignaciosantise I've used this with ethers as well. The problem is while connecting with the metamask. It successfully came back but after coming back, it again redirected to metamask. IDK why. AppkitConfig FIle
Wallet Setup Screen Where I'm calling the Modal by using my own button
|
hey @iamthemuhammadirfan your issue seems to be different, can you open a new issue + upload a video? Also, the issue seems related to Metamask, please be sure you are using the latest version |
@putti-johnnie any news on your side about your issue? |
@ignaciosantise sure, Here is a video for that ScreenRecording.mp4Even via TrustWallet, it has the same issue on Android as well. Android.mp4 |
@ignaciosantise sorry for the delay, just back from holiday. |
@ignaciosantise |
hey @putti-johnnie 👋 i've checked your code and there's an improvement you could do -> move the appkit config code outside "RootLayout" -> import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';
import { useFonts } from 'expo-font';
import { Stack } from 'expo-router';
import * as SplashScreen from 'expo-splash-screen';
import { StatusBar } from 'expo-status-bar';
import { useEffect } from 'react';
import 'react-native-reanimated';
import '@walletconnect/react-native-compat'
import { WagmiProvider } from 'wagmi'
import { mainnet, polygon, arbitrum } from '@wagmi/core/chains'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { createAppKit, defaultWagmiConfig, AppKit } from '@reown/appkit-wagmi-react-native'
import { useColorScheme } from '@/hooks/useColorScheme';
// Prevent the splash screen from auto-hiding before asset loading is complete.
SplashScreen.preventAutoHideAsync();
const queryClient = new QueryClient()
const projectId = 'PROY_ID'
const metadata = {
name: 'Authtest',
description: 'AppKit RN Example',
url: 'https://authtest.co.nz',
icons: ['https://avatars.githubusercontent.com/u/179229932'],
redirect: {
native: 'auth.test://',
}
}
const chains = [mainnet, polygon, arbitrum] as const
const wagmiConfig = defaultWagmiConfig({ chains, projectId, metadata })
// 3. Create modal
createAppKit({
projectId,
wagmiConfig,
})
export default function RootLayout() {
...
return (
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="+not-found" />
</Stack>
<StatusBar style="auto" />
</ThemeProvider>
<AppKit />
</QueryClientProvider>
</WagmiProvider>
);
} regarding your issues:
|
@ignaciosantise thanks for checking, I can confirm they all work after moving config out of App component. Meanwhile I am getting another issue regarding Coinbase wallet, I have followed example app to add Coinbase Wallet supports. But I got "Connection error" constantly. Can you pull my latest commit and run IMG_9279.mov |
Description
Actually, there are 2 issues:
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
Expo Version (if applies)
"expo": "~52.0.25"
Steps to reproduce
await open(); // from const { open } = useAppKit()
Snack, code example, screenshot, or link to a repository
wagmi config:
video:
ScreenRecording_01-17-2025.19-48-08_1.mov
The text was updated successfully, but these errors were encountered: