solana connector debugger

This commit is contained in:
thesn10
2026-05-23 21:28:30 +02:00
parent 86e8d37e4f
commit f86d893ce2
4 changed files with 573 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
import type { ReactNode } from 'react'
import { useMemo } from 'react'
import { AppProvider, getDefaultConfig, getDefaultMobileConfig } from '@solana/connector/react'
import { ConnectorDebugPanel } from '@solana/connector-debugger'
function getOrigin() {
if (typeof window !== 'undefined') return window.location.origin
@@ -37,5 +38,10 @@ export function WalletProviders({ children }: { children: ReactNode }) {
[],
)
return <AppProvider connectorConfig={connectorConfig} mobile={mobile}>{children}</AppProvider>
return (
<AppProvider connectorConfig={connectorConfig} mobile={mobile}>
{process.env.NODE_ENV === 'development' && <ConnectorDebugPanel />}
{children}
</AppProvider>
)
}

View File

@@ -14,7 +14,9 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<html lang="en" suppressHydrationWarning>
<body style={{ margin: 0, padding: 0, fontFamily: 'system-ui, sans-serif' }}>
<NextTamaguiProvider>
<WalletProviders>{children}</WalletProviders>
<WalletProviders>
{children}
</WalletProviders>
</NextTamaguiProvider>
</body>
</html>