@@ -37,11 +37,11 @@ const Home: NextPage = () => {
-
+
-
+
{/* Stake Card with CTA Arrow */}
diff --git a/packages/nextjs/components/StakeCard.tsx b/packages/nextjs/components/StakeCard.tsx
index 64b6371..fd996d8 100644
--- a/packages/nextjs/components/StakeCard.tsx
+++ b/packages/nextjs/components/StakeCard.tsx
@@ -20,28 +20,13 @@ const StakeCard: React.FC
= ({ contractAddress, contractABI }) =
const currentChainId = useChainId();
const { writeContract, isPending, isSuccess, isError, error } = useWriteContract();
- const BASE_SEPOLIA = {
- id: 84532,
- name: "Base Sepolia",
- network: "base-sepolia",
- nativeCurrency: { decimals: 18, name: "Base Sepolia Ether", symbol: "ETH" },
- rpcUrls: {
- default: { http: ["https://sepolia.base.org"] },
- public: { http: ["https://sepolia.base.org"] },
- },
- blockExplorers: {
- default: { name: "BaseScan", url: "https://sepolia.basescan.org" },
- },
- testnet: true,
- };
-
const { data: balance } = useBalance({
address,
- chainId: BASE_SEPOLIA.id,
+ chainId: baseSepolia.id,
});
useEffect(() => {
- if (isConnected && currentChainId !== BASE_SEPOLIA.id) {
+ if (isConnected && currentChainId !== baseSepolia.id) {
setNetworkError("Please switch to Base Sepolia network");
} else {
setNetworkError("");
@@ -55,8 +40,8 @@ const StakeCard: React.FC = ({ contractAddress, contractABI }) =
return;
}
- if (currentChainId !== BASE_SEPOLIA.id) {
- await switchChain({ chainId: BASE_SEPOLIA.id });
+ if (currentChainId !== baseSepolia.id) {
+ await switchChain({ chainId: baseSepolia.id });
return;
}
@@ -87,7 +72,7 @@ const StakeCard: React.FC = ({ contractAddress, contractABI }) =
Stake ETH
{/* Network Warning */}
- {currentChainId !== BASE_SEPOLIA.id && isConnected && (
+ {currentChainId !== baseSepolia.id && isConnected && (
Wrong network. Please switch to Base Sepolia
@@ -125,13 +110,12 @@ const StakeCard: React.FC = ({ contractAddress, contractABI }) =
>
{!isConnected
? "Connect Wallet"
- : currentChainId !== BASE_SEPOLIA.id
+ : currentChainId !== baseSepolia.id
? "Switch Network"
: isPending
? "Staking..."
: "Stake ETH"}
-
{/* Status Messages */}
{isSuccess && (