From 29c02acd91aceaafa3a4d98bcf7e38654b16c999 Mon Sep 17 00:00:00 2001 From: Dan Oved Date: Wed, 28 Feb 2024 12:07:12 -0800 Subject: [PATCH] Prettier fix --- src/app/CreateSafe.tsx | 2 +- src/app/NewSafeProposal.tsx | 2 +- src/app/ViewSafe.tsx | 13 +++++++++---- src/components/Contexts.ts | 1 - src/components/NetworkSwitcher.tsx | 7 ++++--- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/app/CreateSafe.tsx b/src/app/CreateSafe.tsx index a90f9b0..4fd4f7b 100644 --- a/src/app/CreateSafe.tsx +++ b/src/app/CreateSafe.tsx @@ -86,7 +86,7 @@ export function CreateSafe() { }); } }, - [navigate, network, signerInfo, toaster] + [navigate, network, signerInfo, toaster], ); return ( diff --git a/src/app/NewSafeProposal.tsx b/src/app/NewSafeProposal.tsx index 7f087ff..06bff06 100644 --- a/src/app/NewSafeProposal.tsx +++ b/src/app/NewSafeProposal.tsx @@ -345,7 +345,7 @@ const EditProposal = ({ } setIsEditing(false); }, - [proposal, setIsEditing, setProposal, setProposalParams] + [proposal, setIsEditing, setProposal, setProposalParams], ); const defaultActions = proposal || DEFAULT_PROPOSAL; diff --git a/src/app/ViewSafe.tsx b/src/app/ViewSafe.tsx index 9f1e9da..0f1747b 100644 --- a/src/app/ViewSafe.tsx +++ b/src/app/ViewSafe.tsx @@ -5,7 +5,11 @@ import Safe, { EthersAdapter } from "@safe-global/protocol-kit"; import { contractNetworks } from "../chains"; import { Button, View, Text } from "reshaped"; import { Address } from "viem"; -import { NetworkContext, SafeContext, SafeInformationType } from "../components/Contexts"; +import { + NetworkContext, + SafeContext, + SafeInformationType, +} from "../components/Contexts"; type SafeData = Awaited>; @@ -66,7 +70,8 @@ const useLoadSafeInformation = ({ export const ViewSafe = () => { const params = useParams(); const [safeData, setSafeData] = useState(); - const { walletProvider: providerContext } = useOutletContext(); + const { walletProvider: providerContext } = + useOutletContext(); const setupSafe = useCallback(async () => { if (params.safeAddress && providerContext) { @@ -95,10 +100,10 @@ export const ViewSafe = () => { const safeInformation = useLoadSafeInformation({ safeData }); - const safeInformationContext: SafeContext |undefined = useMemo(() => { + const safeInformationContext: SafeContext | undefined = useMemo(() => { if (!safeInformation) return; return { - safeInformation + safeInformation, }; }, [safeInformation]); diff --git a/src/components/Contexts.ts b/src/components/Contexts.ts index 5be8b52..c368c3d 100644 --- a/src/components/Contexts.ts +++ b/src/components/Contexts.ts @@ -15,7 +15,6 @@ export type SafeInformationType = { export interface NetworkContext { walletProvider: BrowserProvider; currentNetwork: number; - } export interface SafeContext { diff --git a/src/components/NetworkSwitcher.tsx b/src/components/NetworkSwitcher.tsx index 8adf6cc..37cf05d 100644 --- a/src/components/NetworkSwitcher.tsx +++ b/src/components/NetworkSwitcher.tsx @@ -9,16 +9,17 @@ export const NetworkSwitcher = ({ }: { currentNetwork: string | undefined; }) => { - const [currentNetworkValue, setCurrentNetworkValue] = useState(currentNetwork); + const [currentNetworkValue, setCurrentNetworkValue] = + useState(currentNetwork); const navigate = useNavigate(); const changeNetwork = useCallback( (e: { value: string }) => { - const networkId = e.value; + const networkId = e.value; setCurrentNetworkValue(networkId); navigate(`/safe/${networkId}`); }, - [navigate] + [navigate], ); return (