From 81bbbd7e572d6f8bc8e199d9225081e1910f06cb Mon Sep 17 00:00:00 2001 From: thesn10 <38666407+thesn10@users.noreply.github.com> Date: Sat, 23 May 2026 15:38:35 +0200 Subject: [PATCH] small fixes --- app/next.config.ts | 2 ++ app/src/app/WalletProviders.tsx | 10 +++++++--- app/src/components/WalletButton.tsx | 11 ++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/next.config.ts b/app/next.config.ts index cd59141..b1496df 100644 --- a/app/next.config.ts +++ b/app/next.config.ts @@ -4,6 +4,8 @@ const nextConfig: NextConfig = { transpilePackages: [ '@tamagui/lucide-icons-2', '@descro/sdk', + '@solana/connector', + '@wallet-ui/core', ], turbopack: { resolveAlias: { diff --git a/app/src/app/WalletProviders.tsx b/app/src/app/WalletProviders.tsx index bfa1205..4cf124c 100644 --- a/app/src/app/WalletProviders.tsx +++ b/app/src/app/WalletProviders.tsx @@ -2,8 +2,7 @@ import type { ReactNode } from 'react' import { useMemo } from 'react' -import { AppProvider } from '@solana/connector/react' -import { getDefaultConfig } from '@solana/connector/headless' +import { AppProvider, getDefaultConfig, getDefaultMobileConfig } from '@solana/connector/react' function getOrigin() { if (typeof window !== 'undefined') return window.location.origin @@ -33,5 +32,10 @@ export function WalletProviders({ children }: { children: ReactNode }) { [], ) - return {children} + const mobile = useMemo( + () => getDefaultMobileConfig({ appName: 'Descro', appUrl: getOrigin() }), + [], + ) + + return {children} } diff --git a/app/src/components/WalletButton.tsx b/app/src/components/WalletButton.tsx index 8076aec..c56fb70 100644 --- a/app/src/components/WalletButton.tsx +++ b/app/src/components/WalletButton.tsx @@ -1,13 +1,10 @@ 'use client' import { useState } from 'react' -import { useConnector, useConnectWallet, useDisconnectWallet, useWalletConnectors } from '@solana/connector/react' +import { useConnector } from '@solana/connector/react' export function WalletButton() { - const { isConnected, isConnecting, account, connector } = useConnector() - const { connect } = useConnectWallet() - const { disconnect } = useDisconnectWallet() - const connectors = useWalletConnectors() + const { isConnected, isConnecting, account, connector, connectWallet, disconnectWallet, connectors } = useConnector() const [showList, setShowList] = useState(false) const baseStyle: React.CSSProperties = { @@ -24,7 +21,7 @@ export function WalletButton() { if (isConnected && account) { const short = `${account.slice(0, 4)}…${account.slice(-4)}` return ( -