You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone! I really hope for your help. The issues are specifically with Telegram Mini Apps.
1. Coinbase opens the page keys.coinbase.com and then freezes.
2. Metamask works very poorly, sometimes it prompts for a connection, and other times it doesn’t work at all.
3. Connecting any social network leads to a blank page - http://.
4. Email connection doesn’t work (the confirmation code is not received).
On the desktop version, everything works perfectly. It also works fine when accessed through native apps, such as Metamask on iOS.
Am I possibly doing something wrong? Unfortunately, there aren’t many alternatives. I tried using Thirdweb but couldn’t set it up to interact with Wagmi since my entire project is built with Wagmi. I’m hoping for your help!
'use client';import{wagmiAdapter,projectId}from'@/config';import{QueryClient,QueryClientProvider}from'@tanstack/react-query';import{createAppKit}from'@reown/appkit/react';import{sonic}from'@reown/appkit/networks';importReact,{typeReactNode}from'react';import{cookieToInitialState,WagmiProvider,typeConfig}from'wagmi';if(!projectId){thrownewError('Project ID is not defined');}constqueryClient=newQueryClient();constmetadata={name: 'appkit-example',description: 'AppKit Example',url: 'https://appkitexampleapp.com',icons: ['https://avatars.githubusercontent.com/u/179229932'],};// Create the modalcreateAppKit({
projectId,adapters: [wagmiAdapter],networks: [sonic],defaultNetwork: sonic,metadata: metadata,features: {email: true,analytics: true},});functionReownProvider({ children, cookies }: {children: ReactNode;cookies: string|null}){constinitialState=cookieToInitialState(wagmiAdapter.wagmiConfigasConfig,cookies);return(<WagmiProviderconfig={wagmiAdapter.wagmiConfigasConfig}initialState={initialState}><QueryClientProviderclient={queryClient}>{children}</QueryClientProvider></WagmiProvider>);}exportdefaultReownProvider;
TelegramSDK
'use client';import{init,isTMA}from'@telegram-apps/sdk-react';import{typeReactNode,useEffect}from'react';functionTelegramSDK({ children }: {children: ReactNode}){useEffect(()=>{constcheckTelegram=async()=>{window.isTelegram=awaitisTMA();if(window.isTelegram)init();};checkTelegram().catch(console.error);},[]);return<>{children}</>;}exportdefaultTelegramSDK;
WagmiAdapter
exportconstnetworks=[sonic];constmetadata={name: 'appkit-example',description: 'AppKit Example',url: 'https://appkitexampleapp.com',// origin must match your domain & subdomainicons: ['https://avatars.githubusercontent.com/u/179229932'],};constconnectors: CreateConnectorFn[]=[];connectors.push(walletConnect({ projectId, metadata,showQrModal: false}));// showQrModal must be falseconnectors.push(injected({shimDisconnect: true}));connectors.push(coinbaseWallet({appName: metadata.name,appLogoUrl: metadata.icons[0],}),);//Set up the Wagmi Adapter (Config)exportconstwagmiAdapter=newWagmiAdapter({storage: createStorage({storage: cookieStorage,}),ssr: true,
projectId,
networks,
connectors,});exportconstconfig=wagmiAdapter.wagmiConfig;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone! I really hope for your help. The issues are specifically with Telegram Mini Apps.
1. Coinbase opens the page keys.coinbase.com and then freezes.
2. Metamask works very poorly, sometimes it prompts for a connection, and other times it doesn’t work at all.
3. Connecting any social network leads to a blank page - http://.
4. Email connection doesn’t work (the confirmation code is not received).
On the desktop version, everything works perfectly. It also works fine when accessed through native apps, such as Metamask on iOS.
Am I possibly doing something wrong? Unfortunately, there aren’t many alternatives. I tried using Thirdweb but couldn’t set it up to interact with Wagmi since my entire project is built with Wagmi. I’m hoping for your help!
layout.tsx
ReownProvider.tsx
TelegramSDK
WagmiAdapter
Beta Was this translation helpful? Give feedback.
All reactions