Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkeating committed Nov 29, 2023
1 parent 47a1398 commit f9ac4fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { goerli, optimismGoerli, mainnet } from 'wagmi/chains';

export const chains = [mainnet, goerli, optimismGoerli];
export const chains = [goerli, optimismGoerli, mainnet];

export enum DaoId {
PoolTogether = 'pool-together',
Expand Down
8 changes: 6 additions & 2 deletions pages/[id]/delegate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { InformationCircleIcon } from '@heroicons/react/24/outline';
import type { NextPage } from 'next';
import Head from 'next/head';
import Image from 'next/image';
import { useAccount, useNetwork, useWalletClient } from 'wagmi';
import { useAccount, useEnsAvatar, useEnsName, useNetwork, useWalletClient } from 'wagmi';
import { isAddress, formatUnits } from 'viem';
import { useForm } from 'react-hook-form';
import { useBalances } from '@/hooks/useBalances';
Expand Down Expand Up @@ -35,6 +35,10 @@ const Delegate: NextPage = () => {
const { chain } = useNetwork();
const [delegateAddress, setDelegateAddress] = useState(address);
const { data: delegatee } = useL2Delegate({});
const {data: delegateEnsName} = useEnsName({address: delegatee, chainId: 1});
const {data: delegateEnsAvatar} = useEnsAvatar({address: delegatee, chainId: 1});
console.log(delegateEnsName);
console.log(delegatee);
const { data: l2VotingWeight } = useL2CurrentVotingWeight({
voterAddress: address || ZERO_ADDRESS,
});
Expand Down Expand Up @@ -121,7 +125,7 @@ const Delegate: NextPage = () => {
<div className="self-center">
{mounted && delegatee !== ZERO_ADDRESS ? (
<div className="flex items-start gap-1">
{delegatee}{' '}
{delegateEnsName || delegatee}{' '}
<InformationCircleIcon
id="delegate-address-information"
className="h-4"
Expand Down

0 comments on commit f9ac4fb

Please sign in to comment.