Skip to content

[bug] wallet disconnects in app with safe wallet & switching networks #2499

@abhijeetbhagat

Description

@abhijeetbhagat

Is there an existing issue for this?

  • I have searched the existing issues

RainbowKit Version

2.2.4

wagmi Version

2.14.12

Current Behavior

i connect to safe wallet via walletconnect and my dapp picks the network safe wallet is connected to. when i now try to switch to a different network on my dapp using rainbowkit's network dropdown, a notification appears in the safe wallet app which is running in a different tab. upon clicking ok and selecting the account in the safe app, the wallet disconnects in the dapp and safe wallet app.

Expected Behavior

network switching should be seamless like how it works for metamask.

Steps To Reproduce

  1. connect to safe wallet via walletconnect
  2. switch the network from the rainbowkit dropdown

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

this is the wagmi config:

export const wagmiConfig = getDefaultConfig({
  appName: 'enscribe',
  projectId: '...',
  chains: [mainnet, linea, base, sepolia, lineaSepolia, baseSepolia],
  ssr: false,
})

const queryClient = new QueryClient()

export default function MyApp({ Component, pageProps }: AppProps) {
  return (
    <ThemeProvider defaultTheme="system" storageKey="enscribe-theme">
      <WagmiProvider config={wagmiConfig}>
        <QueryClientProvider client={queryClient}>
        <ThemeAwareRainbowKit>
            <TransactionProvider>
              <Component {...pageProps} />
            </TransactionProvider>
          </ThemeAwareRainbowKit>
        </QueryClientProvider>
      </WagmiProvider>
    </ThemeProvider>
  )
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions