Skip to content

Commit

Permalink
Prettier fix (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
iainnash authored Feb 28, 2024
2 parents 16e71e0 + 29c02ac commit 5ed49d4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/CreateSafe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function CreateSafe() {
});
}
},
[navigate, network, signerInfo, toaster]
[navigate, network, signerInfo, toaster],
);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/NewSafeProposal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ const EditProposal = ({
}
setIsEditing(false);
},
[proposal, setIsEditing, setProposal, setProposalParams]
[proposal, setIsEditing, setProposal, setProposalParams],
);

const defaultActions = proposal || DEFAULT_PROPOSAL;
Expand Down
13 changes: 9 additions & 4 deletions src/app/ViewSafe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<ReturnType<typeof getSafeSDK>>;

Expand Down Expand Up @@ -66,7 +70,8 @@ const useLoadSafeInformation = ({
export const ViewSafe = () => {
const params = useParams();
const [safeData, setSafeData] = useState<SafeData>();
const { walletProvider: providerContext } = useOutletContext<NetworkContext>();
const { walletProvider: providerContext } =
useOutletContext<NetworkContext>();

const setupSafe = useCallback(async () => {
if (params.safeAddress && providerContext) {
Expand Down Expand Up @@ -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]);

Expand Down
1 change: 0 additions & 1 deletion src/components/Contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export type SafeInformationType = {
export interface NetworkContext {
walletProvider: BrowserProvider;
currentNetwork: number;

}

export interface SafeContext {
Expand Down
7 changes: 4 additions & 3 deletions src/components/NetworkSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 5ed49d4

Please sign in to comment.