Skip to content

Commit 3b827ea

Browse files
committed
[NEB-148] Do not add active chain to nebula context by default (#6564)
1 parent 2231db7 commit 3b827ea

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { Account } from "@3rdweb-sdk/react/hooks/useApi";
1313
import { ArrowRightIcon } from "lucide-react";
1414
import Link from "next/link";
1515
import { useCallback, useEffect, useRef, useState } from "react";
16-
import { useActiveAccount, useActiveWalletChain } from "thirdweb/react";
16+
import { useActiveAccount } from "thirdweb/react";
1717
import { type NebulaContext, promptNebula } from "../api/chat";
1818
import { createSession, updateSession } from "../api/session";
1919
import type { SessionInfo } from "../api/types";
@@ -32,7 +32,6 @@ export function ChatPageContent(props: {
3232
initialPrompt: string | undefined;
3333
}) {
3434
const address = useActiveAccount()?.address;
35-
const activeChain = useActiveWalletChain();
3635
const client = useThirdwebClient(props.authToken);
3736
const [userHasSubmittedMessage, setUserHasSubmittedMessage] = useState(false);
3837
const [messages, setMessages] = useState<Array<ChatMessage>>(() => {
@@ -133,14 +132,9 @@ export function ChatPageContent(props: {
133132
// ignore local storage errors
134133
}
135134

136-
// else - use the active chain
137-
updatedContextFilters.chainIds = activeChain
138-
? [activeChain.id.toString()]
139-
: [];
140-
141135
return updatedContextFilters;
142136
});
143-
}, [address, isNewSession, hasUserUpdatedContextFilters, activeChain]);
137+
}, [address, isNewSession, hasUserUpdatedContextFilters]);
144138

145139
const [sessionId, _setSessionId] = useState<string | undefined>(
146140
props.session?.id,

0 commit comments

Comments
 (0)