Hello, I’m migrating to the fuels/connector.
I’ve set up the context in my app at the highest level as shown here:
export const App = () => {
return (
<PersistQueryClientProvider
client={queryClient}
persistOptions={{ persister }}
>
<FuelProvider
theme="dark"
fuelConfig={{
connectors: defaultConnectors({
devMode: true,
wcProjectId: WC_PROJECT_ID,
ethWagmiConfig: wagmiConfig,
})
}}
>
<BrowserRouter>
<ChakraProvider theme={theme}>
{/*... etc*/}
</ChakraProvider>
</BrowserRouter>
</FuelProvider>
</PersistQueryClientProvider >
);
};
I tried with the basic query client exactly as used in the demo here: fuel-connectors/examples/react-app/src/main.tsx at main · FuelLabs/fuel-connectors · GitHub
export const App = () => {
return (
<QueryClientProvider client={queryClient}>
<FuelProvider
theme="dark"
fuelConfig={{
connectors: defaultConnectors({
devMode: true,
wcProjectId: WC_PROJECT_ID,
ethWagmiConfig: wagmiConfig,
})
}}
>
<BrowserRouter>
<ChakraProvider theme={theme}>
{/*... etc*/}
</ChakraProvider>
</BrowserRouter>
</FuelProvider>
</QueryClientProvider/>
);
};
I can connect my wallet without issue, however when I reload the app or navigate to a new page, the wallet connection state is lost.
I am using version ^0.27.1
for both fuels/connector and fuels/react