diff --git a/packages/nextjs/app/debug/_components/contract/ReadOnlyFunctionForm.tsx b/packages/nextjs/app/debug/_components/contract/ReadOnlyFunctionForm.tsx index 8264907f..c2c013f5 100644 --- a/packages/nextjs/app/debug/_components/contract/ReadOnlyFunctionForm.tsx +++ b/packages/nextjs/app/debug/_components/contract/ReadOnlyFunctionForm.tsx @@ -107,4 +107,4 @@ export const ReadOnlyFunctionForm = ({ ); -}; \ No newline at end of file +}; diff --git a/packages/nextjs/app/dice/page.tsx b/packages/nextjs/app/dice/page.tsx index f3f72ae7..6514769c 100644 --- a/packages/nextjs/app/dice/page.tsx +++ b/packages/nextjs/app/dice/page.tsx @@ -265,4 +265,4 @@ const DiceGame: NextPage = () => { ); }; -export default DiceGame; \ No newline at end of file +export default DiceGame; diff --git a/packages/nextjs/components/SwitchTheme.tsx b/packages/nextjs/components/SwitchTheme.tsx index 9e5293e6..1e080ea3 100644 --- a/packages/nextjs/components/SwitchTheme.tsx +++ b/packages/nextjs/components/SwitchTheme.tsx @@ -40,4 +40,4 @@ export const SwitchTheme = ({ className }: { className?: string }) => { } ); -}; \ No newline at end of file +}; diff --git a/packages/nextjs/components/scaffold-stark/CustomConnectButton/AddressInfoDropdown.tsx b/packages/nextjs/components/scaffold-stark/CustomConnectButton/AddressInfoDropdown.tsx index fc72bb19..46bd4de1 100644 --- a/packages/nextjs/components/scaffold-stark/CustomConnectButton/AddressInfoDropdown.tsx +++ b/packages/nextjs/components/scaffold-stark/CustomConnectButton/AddressInfoDropdown.tsx @@ -2,7 +2,6 @@ import { useRef, useState } from "react"; import { NetworkOptions } from "./NetworkOptions"; import CopyToClipboard from "react-copy-to-clipboard"; import { createPortal } from "react-dom"; -import { createPortal } from "react-dom"; import { ArrowLeftEndOnRectangleIcon, ArrowTopRightOnSquareIcon, @@ -12,23 +11,18 @@ import { DocumentDuplicateIcon, QrCodeIcon, UserCircleIcon, - UserCircleIcon, } from "@heroicons/react/24/outline"; import { useLocalStorage } from "usehooks-ts"; -import { useLocalStorage } from "usehooks-ts"; import { BlockieAvatar, isENS } from "~~/components/scaffold-stark"; import { useOutsideClick } from "~~/hooks/scaffold-stark"; import { BurnerConnector } from "~~/services/web3/stark-burner/BurnerConnector"; -import { BurnerConnector } from "~~/services/web3/stark-burner/BurnerConnector"; import { getTargetNetworks } from "~~/utils/scaffold-stark"; import { burnerAccounts } from "~~/utils/devnetAccounts"; -import { burnerAccounts } from "~~/utils/devnetAccounts"; import { Address } from "@starknet-react/chains"; import { useDisconnect, useNetwork, useConnect } from "@starknet-react/core"; import { getStarknetPFPIfExists } from "~~/utils/profile"; import useConditionalStarkProfile from "~~/hooks/useConditionalStarkProfile"; import { useTheme } from "next-themes"; -import { useEffect } from "react"; const allowedNetworks = getTargetNetworks(); @@ -50,16 +44,10 @@ export const AddressInfoDropdown = ({ const { data: profile } = useConditionalStarkProfile(address); const { chain } = useNetwork(); const [showBurnerAccounts, setShowBurnerAccounts] = useState(false); - const { data: profile } = useConditionalStarkProfile(address); - const { chain } = useNetwork(); - const [showBurnerAccounts, setShowBurnerAccounts] = useState(false); const [selectingNetwork, setSelectingNetwork] = useState(false); const { connectors, connect } = useConnect(); const { resolvedTheme } = useTheme(); const isDarkMode = resolvedTheme === "dark"; - const { connectors, connect } = useConnect(); - const { resolvedTheme } = useTheme(); - const isDarkMode = resolvedTheme === "dark"; const dropdownRef = useRef(null); const closeDropdown = () => { setSelectingNetwork(false); @@ -90,50 +78,13 @@ export const AddressInfoDropdown = ({ }, ); - function handleConnectBurner( - e: React.MouseEvent, - ix: number, - ) { - const connector = connectors.find( - (it) => it.id == "burner-wallet", - ) as BurnerConnector; - if (connector) { - connector.burnerAccount = burnerAccounts[ix]; - connect({ connector }); - setLastConnector({ id: connector.id, ix }); - setShowBurnerAccounts(false); - } - } - - const [_, setLastConnector] = useLocalStorage<{ id: string; ix?: number }>( - "lastUsedConnector", - { id: "" }, - { - initializeWithValue: false, - }, - ); - return ( <>
- {getStarknetPFPIfExists(profile?.profilePicture) ? ( - //eslint-disable-next-line @next/next/no-img-element - Profile Picture - ) : ( - - )} - {getStarknetPFPIfExists(profile?.profilePicture) ? ( //eslint-disable-next-line @next/next/no-img-element
); -}; +}; \ No newline at end of file diff --git a/packages/nextjs/components/scaffold-stark/Faucet.tsx b/packages/nextjs/components/scaffold-stark/Faucet.tsx index 0d8a1a5f..05a3ff48 100644 --- a/packages/nextjs/components/scaffold-stark/Faucet.tsx +++ b/packages/nextjs/components/scaffold-stark/Faucet.tsx @@ -161,4 +161,4 @@ export const Faucet = () => { ); -}; \ No newline at end of file +};