Skip to content

Commit d9cbf1c

Browse files
committed
refactor: streamline project ID handling in AppKitProvider
- Updated the project ID assignment in both admin and client main files to exclusively use VITE_WALLETCONNECT_PROJECT_ID. - Changed error logging in AppKitProvider to a warning for improved clarity on missing project ID configuration.
1 parent 4d967d6 commit d9cbf1c

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

packages/admin/src/main.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ const cleanupTheme = initTheme();
2121

2222
export const Root = () => (
2323
<AppKitProvider
24-
projectId={
25-
import.meta.env.VITE_REOWN_PROJECT_ID || import.meta.env.VITE_WALLETCONNECT_PROJECT_ID
26-
}
24+
projectId={import.meta.env.VITE_WALLETCONNECT_PROJECT_ID}
2725
metadata={{
2826
name: "Green Goods Admin",
2927
description: "Garden management dashboard for Green Goods protocol",

packages/client/src/main.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ if (import.meta.env.DEV && import.meta.env.VITE_ENABLE_SW_DEV !== "true") {
3737
export const Root = () => (
3838
<AppErrorBoundary>
3939
<AppKitProvider
40-
projectId={
41-
import.meta.env.VITE_REOWN_PROJECT_ID || import.meta.env.VITE_WALLETCONNECT_PROJECT_ID
42-
}
40+
projectId={import.meta.env.VITE_WALLETCONNECT_PROJECT_ID}
4341
metadata={{
4442
name: "Green Goods",
4543
description: "Start Bringing Biodiversity Onchain",

packages/shared/src/providers/AppKitProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function AppKitProvider({
5454
// Initialize AppKit once
5555
useEffect(() => {
5656
if (!projectId) {
57-
console.error(
57+
console.warn(
5858
"AppKit: Project ID is missing. Set VITE_REOWN_PROJECT_ID or VITE_WALLETCONNECT_PROJECT_ID in .env"
5959
);
6060
return;

0 commit comments

Comments
 (0)