Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/dashboard/src/app/(app)/account/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default async function AccountLayout(props: {
/>
{props.children}
</div>
<TWAutoConnect />
<TWAutoConnect client={client} />
<AppFooter />
</div>
);
Expand Down
7 changes: 3 additions & 4 deletions apps/dashboard/src/app/(app)/components/autoconnect.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
"use client";
import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
import type { ThirdwebClient } from "thirdweb";
import { AutoConnect } from "thirdweb/react";
import type { SmartWalletOptions } from "thirdweb/wallets";

const client = getClientThirdwebClient();

export function TWAutoConnect(props: {
accountAbstraction?: SmartWalletOptions;
client: ThirdwebClient;
}) {
return (
<AutoConnect
client={client}
client={props.client}
accountAbstraction={props.accountAbstraction}
/>
);
Expand Down
3 changes: 2 additions & 1 deletion apps/dashboard/src/app/(app)/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
import { TWAutoConnect } from "./components/autoconnect";

const queryClient = new QueryClient();
const thirdwebClient = getClientThirdwebClient();

export function AppRouterProviders(props: { children: React.ReactNode }) {
return (
Expand All @@ -26,7 +27,7 @@ export function AppRouterProviders(props: { children: React.ReactNode }) {
<SyncChainStores />
<ThirdwebProvider>
<SyncChainDefinitionsToConnectionManager />
<TWAutoConnect />
<TWAutoConnect client={thirdwebClient} />
<ThemeProvider
attribute="class"
disableTransitionOnChange
Expand Down
6 changes: 5 additions & 1 deletion apps/dashboard/src/app/nebula-app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Toaster } from "sonner";
import { ThirdwebProvider, useActiveAccount } from "thirdweb/react";
import { TWAutoConnect } from "../(app)/components/autoconnect";
import { NebulaConnectWallet } from "./(app)/components/NebulaConnectButton";
import { nebulaAppThirdwebClient } from "./(app)/utils/nebulaThirdwebClient";
import { nebulaAAOptions } from "./login/account-abstraction";

const queryClient = new QueryClient();
Expand All @@ -16,7 +17,10 @@ export function NebulaProviders(props: { children: React.ReactNode }) {
return (
<QueryClientProvider client={queryClient}>
<ThirdwebProvider>
<TWAutoConnect accountAbstraction={nebulaAAOptions} />
<TWAutoConnect
accountAbstraction={nebulaAAOptions}
client={nebulaAppThirdwebClient}
/>
<ThemeProvider
attribute="class"
disableTransitionOnChange
Expand Down
Loading