diff --git a/app/build/bridge/page.tsx b/app/build/bridge/page.tsx index 3b6d90e..88716be 100644 --- a/app/build/bridge/page.tsx +++ b/app/build/bridge/page.tsx @@ -4,7 +4,7 @@ import { useCallback, useEffect, useState } from "react"; import Image from "next/image"; import { ChevronDown, ArrowLeftRight, CreditCard, Loader2, ExternalLink, CheckCircle2, AlertTriangle } from "lucide-react"; import { useAccount, useWalletClient, useSwitchChain, useChainId } from "wagmi"; -import { useAppKit } from "@reown/appkit/react"; +import { openWallet } from "@/lib/appkit"; import { createPublicClient, http, parseEther, type PublicClient } from "viem"; import { BRIDGE_ROUTE, HYPERLANE_ROUTER_ABI, ERC20_ABI, addressToBytes32 } from "lightnode-sdk"; import { CodeTabs } from "@/components/build/console/code-tabs"; @@ -134,7 +134,6 @@ async function resolveFeeParams(pub: PublicClient): Promise("eth-to-lc"); const [amount, setAmount] = useState(""); const [bal, setBal] = useState(null); @@ -245,7 +244,7 @@ export default function BridgePanel() { const executeBridge = async () => { if (!isConnected || !walletClient || !address) { - open(); + openWallet(); return; } const amt = validateAmount(); @@ -339,7 +338,7 @@ export default function BridgePanel() { {shortAddr(address)} ) : ( - )} diff --git a/app/build/dao/voting-power-card.tsx b/app/build/dao/voting-power-card.tsx index 32be3e1..0fd31f6 100644 --- a/app/build/dao/voting-power-card.tsx +++ b/app/build/dao/voting-power-card.tsx @@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { ShieldCheck, AlertTriangle, ExternalLink, Wallet } from "lucide-react"; import { useAccount } from "wagmi"; -import { useAppKit } from "@reown/appkit/react"; +import { openWallet } from "@/lib/appkit"; import { short } from "@/components/build/console/panel-kit"; import { DAO_VOTE_UI, DELEGATION_UI, loadVotingPower, type DaoChain, type VotingPowerReads } from "./dao-chain"; import { delegationStatus, formatLcaiWei } from "./dao-math"; @@ -17,7 +17,6 @@ const SYMBOL: Record = { ethereum: "LCAIB", lightchain: "LCAI" */ export function VotingPowerCard({ chain }: { chain: DaoChain }) { const { address, isConnected } = useAccount(); - const { open } = useAppKit(); const [reads, setReads] = useState(null); const [loading, setLoading] = useState(false); // Stale-read guard: a slow read for the previous chain/account must not @@ -49,7 +48,7 @@ export function VotingPowerCard({ chain }: { chain: DaoChain }) { return ( ); @@ -53,7 +58,7 @@ export function ConnectButton({ size = "default" }: { size?: ButtonProps["size"] return (