From da92a2450f68b7b69b231f1df93f15f0c84c9b6c Mon Sep 17 00:00:00 2001
From: mezger75 <110202847+mezger75@users.noreply.github.com>
Date: Sat, 29 Jun 2024 15:22:34 +0300
Subject: [PATCH] Feature/ik/smart wallet integration (#188)
* update deps for smartwallet
* add base sepolia config
* add smart wallet connect button raw
* update deps for smartwallet
* fix smartwallet button visibility & text color, fix curryncy symbol at user profile
* show blockExplorer links depending on chosen network
* add base sepolia faucets & update faucets show depending on chain id
---
.../dropdown/dropdownFaucetMenu.tsx | 226 ++++++++++--------
.../leaderboard-card/leaderboardCard.tsx | 4 +-
2 files changed, 134 insertions(+), 96 deletions(-)
diff --git a/frontend/src/app/components/dropdown/dropdownFaucetMenu.tsx b/frontend/src/app/components/dropdown/dropdownFaucetMenu.tsx
index 4e36fc3..8a79747 100644
--- a/frontend/src/app/components/dropdown/dropdownFaucetMenu.tsx
+++ b/frontend/src/app/components/dropdown/dropdownFaucetMenu.tsx
@@ -11,9 +11,12 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
} from "@/app/components/ui/dropdown-menu";
-import { Button } from "../ui/button";
+import { Button } from "@/app/components/ui/button";
+import { useAccount } from "wagmi";
function DropdownFaucetMenu() {
+ const { chainId } = useAccount();
+ console.log("ChainID:", chainId);
return (
@@ -24,108 +27,143 @@ function DropdownFaucetMenu() {
- {/*
-
- ETH Scroll Sepolia
-
-
-
- Faucetme
-
-
+ {chainId === 84532 && (
+
+
+ ETH Base Sepolia
+
+
+
+ Superchain Faucet
+
+
-
-
- BWARE Labs
-
-
+
+
+ Alchemy Faucet
+
+
-
-
- L2faucet
-
-
-
+
+
+ LearnWeb3 Faucet
+
+
+
+ )}
- */}
+ {chainId === 534351 && (
+
+
+ ETH Scroll Sepolia
+
+
+
+ Faucetme
+
+
-
-
- BNB Faucet & Bridge
-
-
-
- BNB Faucet
-
-
-
-
- Bridge to opBNB
-
-
-
+
+
+ BWARE Labs
+
+
+
+
+
+ L2faucet
+
+
+
+ )}
{/* */}
- {/*
-
- Matic Polygon Amoy
-
-
-
- Alchemy faucet
-
-
-
-
- Polygon faucet
-
-
-
-
- Faucet trade
-
-
-
+ {chainId === 5611 && (
+
+
+ BNB Faucet & Bridge
+
+
+
+ BNB Faucet
+
+
+
+
+ Bridge to opBNB
+
+
+
+ )}
- */}
+ {chainId === 80002 && (
+
+
+ Matic Polygon Amoy
+
+
+
+ Alchemy faucet
+
+
+
+
+ Polygon faucet
+
+
+
+
+ Faucet trade
+
+
+
+ )}
-
-
- ETH Blast Sepolia
-
-
-
- Blastapi faucet
-
-
-
-
- QuickNode faucet
-
-
-
+ {chainId === 168587773 && (
+
+
+ ETH Blast Sepolia
+
+
+
+ Blastapi faucet
+
+
+
+
+ QuickNode faucet
+
+
+
+ )}
diff --git a/frontend/src/app/components/leaderboard-card/leaderboardCard.tsx b/frontend/src/app/components/leaderboard-card/leaderboardCard.tsx
index acf11c1..9146189 100644
--- a/frontend/src/app/components/leaderboard-card/leaderboardCard.tsx
+++ b/frontend/src/app/components/leaderboard-card/leaderboardCard.tsx
@@ -35,8 +35,8 @@ export function LeaderboardCard() {
const [leaderboard, setLeaderboard] = useState([]);
const { chainId } = useAccount();
const chainBlockExplorerLinks: Record = {
- // 5611: "https://opbnb-testnet.bscscan.com/address/",
- // 168587773: "https://testnet.blastscan.io/address/",
+ 5611: "https://opbnb-testnet.bscscan.com/address/",
+ 168587773: "https://testnet.blastscan.io/address/",
84532: "https://sepolia.basescan.org/address/",
};