Skip to content

Commit f0e01ec

Browse files
committed
fix: linter
1 parent 1fb2b05 commit f0e01ec

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

web/src/components/DisputePreview/Alias.tsx

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const AliasContainer = styled.div`
1313
gap: 8px;
1414
align-items: center;
1515
`;
16+
1617
const TextContainer = styled.div`
1718
display: flex;
1819
> label {
@@ -26,17 +27,14 @@ interface IAlias {
2627
}
2728

2829
const AliasDisplay: React.FC<IAlias> = ({ alias }) => {
29-
let address: string;
30-
3130
const { data: addressFromENS, isLoading } = useEnsAddress({
32-
enabled: !isAddress(alias.address), //if alias.address is not an Address, we treat it as ENS and try to fetch address from there
31+
enabled: !isAddress(alias.address), // if alias.address is not an Address, we treat it as ENS and try to fetch address from there
3332
name: alias.address,
3433
chainId: 1,
3534
});
3635

37-
//try fetching ens name, else go with address
38-
if (addressFromENS) address = addressFromENS;
39-
else address = alias.address;
36+
// try fetching ens name, else go with address
37+
const address = addressFromENS ?? alias.address;
4038

4139
return (
4240
<AliasContainer>

web/src/utils/wrapWithToast.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { toast, ToastPosition, Theme } from "react-toastify";
2-
import { TransactionReceipt } from "viem";
2+
import { PublicClient, TransactionReceipt } from "viem";
33

44
export const OPTIONS = {
55
position: "top-center" as ToastPosition,
@@ -19,7 +19,7 @@ type WrapWithToastReturnType = {
1919

2020
export async function wrapWithToast(
2121
contractWrite: () => Promise<`0x${string}`>,
22-
publicClient: any
22+
publicClient: PublicClient
2323
): Promise<WrapWithToastReturnType> {
2424
toast.info("Transaction initiated", OPTIONS);
2525
return await contractWrite()

0 commit comments

Comments
 (0)