diff --git a/client/package.json b/client/package.json
index da584cf..9095c07 100644
--- a/client/package.json
+++ b/client/package.json
@@ -33,7 +33,8 @@
"styled-components": "^6.1.14",
"tailwind-merge": "^3.0.1",
"three": "^0.173.0",
- "three.meshline": "^1.4.0"
+ "three.meshline": "^1.4.0",
+ "viem": "^2.23.2"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
diff --git a/client/src/App.tsx b/client/src/App.tsx
index 1b46991..d5e7c2f 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -11,7 +11,7 @@ const ProtectedRoute = ({ children }: { children: React.ReactNode }) => {
const { authenticated } = usePrivy();
const { wallets } = useSolanaWallets()
console.log(wallets[0]);
- if (!authenticated && wallets.length===0) {
+ if (!authenticated) {
return ;
}
diff --git a/client/src/components/providers.tsx b/client/src/components/providers.tsx
index 1c90679..4d27c96 100644
--- a/client/src/components/providers.tsx
+++ b/client/src/components/providers.tsx
@@ -1,35 +1,37 @@
-import { PrivyProvider } from "@privy-io/react-auth";
-import { toSolanaWalletConnectors } from "@privy-io/react-auth/solana";
-
-const solanaConnectors = toSolanaWalletConnectors({
- // By default, shouldAutoConnect is enabled
- shouldAutoConnect: true,
-});
+import { PrivyProvider } from '@privy-io/react-auth';
+import {bsc} from 'viem/chains';
export default function Providers({ children }: { children: React.ReactNode }) {
return (
-
- {children}
-
+ >
+ {children}
+
);
}
+
diff --git a/client/src/pages/Home.tsx b/client/src/pages/Home.tsx
index 49ffc03..73dbc2a 100644
--- a/client/src/pages/Home.tsx
+++ b/client/src/pages/Home.tsx
@@ -14,7 +14,7 @@ import cardIcon2 from "../../public/icons/Box.svg";
import cardIcon3 from "../../public/icons/Share Circle.svg";
import cardIcon4 from "../../public/icons/SSD Square.svg";
import cardIcon5 from "../../public/icons/Posts Carousel Horizontal.svg";
-import { usePrivy, useSolanaWallets } from '@privy-io/react-auth';
+import { usePrivy } from '@privy-io/react-auth';
import { useEffect, useState } from "react";
import Spline from '@splinetool/react-spline'
import axios from 'axios'
@@ -23,14 +23,13 @@ const Home = () => {
const { login, authenticated, ready, connectOrCreateWallet } = usePrivy()
const navigate = useNavigate()
- const { wallets } = useSolanaWallets()
const handleLogin = async () => {
- if (authenticated || wallets[0]) {
+ if (authenticated) {
navigate("/create-agent")
} else {
- connectOrCreateWallet()
+ login()
}
}
const [hash, setHash] = useState("efgunyhed5frvgtbyu8799j");