File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
components/DisputePreview Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const AliasContainer = styled.div`
1313 gap: 8px;
1414 align-items: center;
1515` ;
16+
1617const TextContainer = styled . div `
1718 display: flex;
1819 > label {
@@ -26,17 +27,14 @@ interface IAlias {
2627}
2728
2829const 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 >
Original file line number Diff line number Diff line change 11import { toast , ToastPosition , Theme } from "react-toastify" ;
2- import { TransactionReceipt } from "viem" ;
2+ import { PublicClient , TransactionReceipt } from "viem" ;
33
44export const OPTIONS = {
55 position : "top-center" as ToastPosition ,
@@ -19,7 +19,7 @@ type WrapWithToastReturnType = {
1919
2020export 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 ( )
You can’t perform that action at this time.
0 commit comments