Skip to content

Commit

Permalink
Refactor useEthersProvider and useEthersSigner to return singleton in…
Browse files Browse the repository at this point in the history
…stance from EthersContext
  • Loading branch information
mudrila committed Mar 7, 2024
1 parent e229bb0 commit 4cdd6f1
Show file tree
Hide file tree
Showing 45 changed files with 151 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { erc721ABI } from 'wagmi';
import useDisplayName from '../../../hooks/utils/useDisplayName';
import { useEthersProvider } from '../../../hooks/utils/useEthersProvider';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { BigNumberValuePair, ERC721TokenConfig } from '../../../types';
import { BarLoader } from '../../ui/loaders/BarLoader';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
import { erc20ABI } from 'wagmi';
import { BACKGROUND_SEMI_TRANSPARENT } from '../../../constants/common';
import { createAccountSubstring } from '../../../hooks/utils/useDisplayName';
import { useEthersProvider } from '../../../hooks/utils/useEthersProvider';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { TokenCreationType, ICreationStepProps } from '../../../types';
import SupportTooltip from '../../ui/badges/SupportTooltip';
import ContentBoxTitle from '../../ui/containers/ContentBox/ContentBoxTitle';
Expand Down
4 changes: 2 additions & 2 deletions src/components/DaoCreator/hooks/usePrepareFormData.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IVotes__factory } from '@fractal-framework/fractal-contracts';

import { useCallback } from 'react';
import { useEthersProvider } from '../../../hooks/utils/useEthersProvider';
import { useEthersSigner } from '../../../hooks/utils/useEthersSigner';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner';
import {
SafeMultisigDAO,
DAOFreezeGuardConfig,
Expand Down
6 changes: 5 additions & 1 deletion src/components/pages/DAOTreasury/components/Assets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ export function Assets() {
const showClaimETHButton = canUserCreateProposal && staking.lido && lidoWithdrawelNFT;
useEffect(() => {
const getLidoClaimableStatus = async () => {
if (!staking.lido?.withdrawalQueueContractAddress || !lidoWithdrawelNFT) {
if (
!staking.lido?.withdrawalQueueContractAddress ||
!lidoWithdrawelNFT ||
!signerOrProvider
) {
return;
}
const withdrawalQueueContract = getWithdrawalQueueContract(
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/DaoDashboard/Info/InfoGovernance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Govern } from '@decent-org/fractal-ui';
import { MultisigFreezeGuard } from '@fractal-framework/fractal-contracts';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useEthersProvider } from '../../../../hooks/utils/useEthersProvider';
import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider';
import { useTimeHelpers } from '../../../../hooks/utils/useTimeHelpers';
import { useFractal } from '../../../../providers/App/AppProvider';
import { AzoriusGovernance, FreezeGuardType } from '../../../../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useCallback, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import * as Yup from 'yup';
import { useValidationAddress } from '../../../../../../hooks/schemas/common/useValidationAddress';
import { useEthersSigner } from '../../../../../../hooks/utils/useEthersSigner';
import { useEthersSigner } from '../../../../../../providers/Ethers/hooks/useEthersSigner';
import { useFractal } from '../../../../../../providers/App/AppProvider';
import { couldBeENS } from '../../../../../../utils/url';
import SupportTooltip from '../../../../../ui/badges/SupportTooltip';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Address, useEnsName } from 'wagmi';
import { useEthersProvider } from '../../../../../../hooks/utils/useEthersProvider';
import { useEthersProvider } from '../../../../../../providers/Ethers/hooks/useEthersProvider';
import { useFractal } from '../../../../../../providers/App/AppProvider';
import SupportTooltip from '../../../../../ui/badges/SupportTooltip';
import { CustomNonceInput } from '../../../../../ui/forms/CustomNonceInput';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/modals/DelegateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as Yup from 'yup';
import useDelegateVote from '../../../hooks/DAO/useDelegateVote';
import { useValidationAddress } from '../../../hooks/schemas/common/useValidationAddress';
import useDisplayName from '../../../hooks/utils/useDisplayName';
import { useEthersSigner } from '../../../hooks/utils/useEthersSigner';
import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner';
import { useFractal } from '../../../providers/App/AppProvider';
import { AzoriusGovernance, DecentGovernance } from '../../../types';
import { formatCoin } from '../../../utils/numberFormats';
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/modals/ForkProposalTemplateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { DAO_ROUTES } from '../../../constants/routes';
import useSubmitProposal from '../../../hooks/DAO/proposal/useSubmitProposal';
import { useIsSafe } from '../../../hooks/safe/useIsSafe';
import { validateAddress } from '../../../hooks/schemas/common/useValidationAddress';
import { useEthersProvider } from '../../../hooks/utils/useEthersProvider';
import { useEthersSigner } from '../../../hooks/utils/useEthersSigner';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner';
import { useFractal } from '../../../providers/App/AppProvider';
import { disconnectedChain } from '../../../providers/NetworkConfig/NetworkConfigProvider';
import { ProposalTemplate } from '../../../types/createProposalTemplate';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/modals/UnwrapToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useAccount } from 'wagmi';
import * as Yup from 'yup';
import { useERC20LinearToken } from '../../../hooks/DAO/loaders/governance/useERC20LinearToken';
import useApproval from '../../../hooks/utils/useApproval';
import { useEthersSigner } from '../../../hooks/utils/useEthersSigner';
import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner';
import { useFormHelpers } from '../../../hooks/utils/useFormHelpers';
import { useTransaction } from '../../../hooks/utils/useTransaction';
import { useFractal } from '../../../providers/App/AppProvider';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/modals/WrapToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as Yup from 'yup';
import { logError } from '../../../helpers/errorLogging';
import { useERC20LinearToken } from '../../../hooks/DAO/loaders/governance/useERC20LinearToken';
import useApproval from '../../../hooks/utils/useApproval';
import { useEthersSigner } from '../../../hooks/utils/useEthersSigner';
import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner';
import { useFormHelpers } from '../../../hooks/utils/useFormHelpers';
import { useTransaction } from '../../../hooks/utils/useTransaction';
import { useFractal } from '../../../providers/App/AppProvider';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/proposal/useProposalCountdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { logError } from '../../../helpers/errorLogging';
import useSnapshotProposal from '../../../hooks/DAO/loaders/snapshot/useSnapshotProposal';
import { useDAOProposals } from '../../../hooks/DAO/loaders/useProposals';
import useUpdateProposalState from '../../../hooks/DAO/proposal/useUpdateProposalState';
import { useEthersProvider } from '../../../hooks/utils/useEthersProvider';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { useFractal } from '../../../providers/App/AppProvider';
import {
AzoriusGovernance,
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useEthersProvider } from '../../hooks/utils/useEthersProvider';
import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider';
import { supportedChains } from '../../providers/NetworkConfig/NetworkConfigProvider';

export const useSubgraphChainName = () => {
Expand Down
8 changes: 5 additions & 3 deletions src/hooks/DAO/loaders/governance/useAzoriusProposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { useCallback, useEffect, useMemo } from 'react';
import { getEventRPC } from '../../../../helpers';
import { useFractal } from '../../../../providers/App/AppProvider';
import { FractalGovernanceAction } from '../../../../providers/App/governance/action';
import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider';
import { ProposalMetadata, MetaTransaction, VotingStrategyType } from '../../../../types';
import { AzoriusProposal, ProposalData } from '../../../../types/daoProposal';
import { mapProposalCreatedEventToProposal, getProposalVotesSummary } from '../../../../utils';
import { useAsyncRetry } from '../../../utils/useAsyncRetry';
import { useEthersProvider } from '../../../utils/useEthersProvider';
import { useSafeDecoder } from '../../../utils/useSafeDecoder';

export const useAzoriusProposals = () => {
Expand Down Expand Up @@ -51,7 +51,8 @@ export const useAzoriusProposals = () => {
if (
!azoriusContract ||
!(ozLinearVotingContract || erc721LinearVotingContract) ||
!strategyType
!strategyType ||
!provider
) {
return [];
}
Expand Down Expand Up @@ -108,7 +109,8 @@ export const useAzoriusProposals = () => {
if (
!azoriusContract ||
!(ozLinearVotingContract || erc721LinearVotingContract) ||
!strategyType
!strategyType ||
!provider
) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/DAO/loaders/governance/useERC20LinearStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { useCallback, useEffect } from 'react';
import { getEventRPC } from '../../../../helpers';
import { useFractal } from '../../../../providers/App/AppProvider';
import { FractalGovernanceAction } from '../../../../providers/App/governance/action';
import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider';
import { VotingStrategyType } from '../../../../types';
import { blocksToSeconds } from '../../../../utils/contract';
import { useEthersProvider } from '../../../utils/useEthersProvider';
import { useTimeHelpers } from '../../../utils/useTimeHelpers';

export const useERC20LinearStrategy = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { useCallback, useEffect } from 'react';
import { getEventRPC } from '../../../../helpers';
import { useFractal } from '../../../../providers/App/AppProvider';
import { FractalGovernanceAction } from '../../../../providers/App/governance/action';
import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider';
import { VotingStrategyType } from '../../../../types';
import { blocksToSeconds } from '../../../../utils/contract';
import { useEthersProvider } from '../../../utils/useEthersProvider';
import { useTimeHelpers } from '../../../utils/useTimeHelpers';

export const useERC721LinearStrategy = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/DAO/loaders/useFractalFreeze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
} from '../../../helpers/freezePeriodHelpers';
import { useFractal } from '../../../providers/App/AppProvider';
import { FractalGuardAction } from '../../../providers/App/guard/action';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { ContractConnection, FractalGuardContracts, FreezeVotingType } from '../../../types';
import { blocksToSeconds, getTimeStamp } from '../../../utils/contract';
import { useEthersProvider } from '../../utils/useEthersProvider';
import useUserERC721VotingTokens from '../proposal/useUserERC721VotingTokens';
import { FreezeGuard } from './../../../types/fractal';

Expand Down
10 changes: 7 additions & 3 deletions src/hooks/DAO/loaders/useFractalGuardContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { constants } from 'ethers';
import { useCallback, useEffect, useRef } from 'react';
import { useFractal } from '../../../providers/App/AppProvider';
import { GuardContractAction } from '../../../providers/App/guardContracts/action';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import {
ContractConnection,
SafeInfoResponseWithGuard,
Expand All @@ -27,9 +28,8 @@ export const useFractalGuardContracts = ({ loadOnMount = true }: { loadOnMount?:
action,
} = useFractal();

const {
network: { chainId },
} = useEthersProvider();
const provider = useEthersProvider();
const chainId = provider?.network.chainId;

const { getZodiacModuleProxyMasterCopyData } = useMasterCopy();

Expand Down Expand Up @@ -122,6 +122,10 @@ export const useFractalGuardContracts = ({ loadOnMount = true }: { loadOnMount?:
}, [action, daoAddress, safe, fractalModules, loadFractalGuardContracts]);

useEffect(() => {
if (chainId === undefined) {
return;
}

if (daoAddress && chainId + daoAddress !== loadKey.current && loadOnMount && isModulesLoaded) {
loadKey.current = chainId + daoAddress;
setGuardContracts();
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/DAO/loaders/useFractalNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const useFractalNode = ({ daoAddress }: { daoAddress?: string }) => {
});

const fetchSafeInfo = useCallback(async () => {
if (daoAddress) {
if (daoAddress && safeAPI) {
const safeInfo = await safeAPI.getSafeInfo(utils.getAddress(daoAddress));
return safeInfo;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/DAO/loaders/useFractalTreasury.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { logError } from '../../../helpers/errorLogging';
import { useFractal } from '../../../providers/App/AppProvider';
import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI';
import { TreasuryAction } from '../../../providers/App/treasury/action';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider';
import { buildSafeApiUrl } from '../../../utils';
import { useEthersProvider } from '../../utils/useEthersProvider';
import { useUpdateTimer } from './../../utils/useUpdateTimer';

export const useFractalTreasury = () => {
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/DAO/loaders/useGovernanceContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useCallback, useEffect, useRef } from 'react';
import { LockRelease, LockRelease__factory } from '../../../assets/typechain-types/dcnt';
import { useFractal } from '../../../providers/App/AppProvider';
import { GovernanceContractAction } from '../../../providers/App/governanceContracts/action';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { ContractConnection } from '../../../types';
import { getAzoriusModuleFromModules } from '../../../utils';
import { useEthersProvider } from '../../utils/useEthersProvider';
Expand Down Expand Up @@ -108,7 +109,7 @@ export const useGovernanceContracts = () => {
return undefined;
});

if (lockedToken) {
if (lockedToken && provider) {
lockReleaseContract = {
asSigner: LockRelease__factory.connect(govTokenAddress, signerOrProvider),
asProvider: LockRelease__factory.connect(govTokenAddress, provider),
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/DAO/proposal/useCastVote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { toast } from 'react-toastify';
import { useVoteContext } from '../../../components/Proposals/ProposalVotes/context/VoteContext';
import { logError } from '../../../helpers/errorLogging';
import { useFractal } from '../../../providers/App/AppProvider';
import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner';
import {
AzoriusGovernance,
GovernanceType,
FractalProposal,
ExtendedSnapshotProposal,
} from '../../../types';
import encryptWithShutter from '../../../utils/shutter';
import { useEthersSigner } from '../../utils/useEthersSigner';
import { useTransaction } from '../../utils/useTransaction';
import useSnapshotSpaceName from '../loaders/snapshot/useSnapshotSpaceName';
import useUserERC721VotingTokens from './useUserERC721VotingTokens';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/DAO/proposal/usePrepareProposal.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback } from 'react';
import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner';
import { CreateProposalForm } from '../../../types';
import { encodeFunction } from '../../../utils/crypto';
import { couldBeENS } from '../../../utils/url';
import { useEthersSigner } from '../../utils/useEthersSigner';

export function usePrepareProposal() {
const signer = useEthersSigner();
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/DAO/proposal/useSubmitProposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { logError } from '../../../helpers/errorLogging';
import { useFractal } from '../../../providers/App/AppProvider';
import useIPFSClient from '../../../providers/App/hooks/useIPFSClient';
import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner';
import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider';
import {
MetaTransaction,
Expand All @@ -21,8 +23,6 @@ import {
} from '../../../types';
import { buildSafeApiUrl, getAzoriusModuleFromModules } from '../../../utils';
import { getAverageBlockTime } from '../../../utils/contract';
import { useEthersProvider } from '../../utils/useEthersProvider';
import { useEthersSigner } from '../../utils/useEthersSigner';
import useSignerOrProvider from '../../utils/useSignerOrProvider';
import { useFractalModules } from '../loaders/useFractalModules';
import { useDAOProposals } from '../loaders/useProposals';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/DAO/useClawBack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { ethers, utils } from 'ethers';
import { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { useSafeAPI } from '../../providers/App/hooks/useSafeAPI';
import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider';
import { FractalModuleType, FractalNode } from '../../types';
import { useEthersProvider } from '../utils/useEthersProvider';
import useSubmitProposal from './proposal/useSubmitProposal';

interface IUseClawBack {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/DAO/useDAOName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { useCallback, useEffect, useState } from 'react';
import { Address, useEnsName } from 'wagmi';
import { getEventRPC } from '../../helpers';
import { useFractal } from '../../providers/App/AppProvider';
import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider';
import { CacheKeys } from '../utils/cache/cacheDefaults';
import { useLocalStorage } from '../utils/cache/useLocalStorage';
import { createAccountSubstring } from '../utils/useDisplayName';
import { useEthersProvider } from '../utils/useEthersProvider';

/**
* Gets the 'display name' for a Fractal DAO, in the following order of preference:
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/safe/useSafeContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import {
import { useMemo } from 'react';
import { MultiSend__factory } from '../../assets/typechain-types/usul';
import { GnosisSafeL2__factory } from '../../assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts';
import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider';
import { useNetworkConfig } from '../../providers/NetworkConfig/NetworkConfigProvider';
import { useEthersProvider } from '../utils/useEthersProvider';
import useSignerOrProvider from '../utils/useSignerOrProvider';

export default function useSafeContracts() {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/schemas/DAOCreate/useDAOCreateTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { useTranslation } from 'react-i18next';
import { erc20ABI } from 'wagmi';
import { AnyObject } from 'yup';
import { logError } from '../../../helpers/errorLogging';
import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider';
import { AddressValidationMap, CreatorFormState, TokenAllocation } from '../../../types';
import { couldBeENS } from '../../../utils/url';
import { useEthersProvider } from '../../utils/useEthersProvider';
import useSignerOrProvider from '../../utils/useSignerOrProvider';
import { validateAddress } from '../common/useValidationAddress';

Expand Down
6 changes: 3 additions & 3 deletions src/hooks/schemas/common/useValidationAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { useMemo, useRef, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { AnyObject } from 'yup';
import { useFractal } from '../../../providers/App/AppProvider';
import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner';
import { AddressValidationMap, ERC721TokenConfig } from '../../../types';
import { Providers } from '../../../types/network';
import { couldBeENS } from '../../../utils/url';
import { useEthersSigner } from '../../utils/useEthersSigner';
import useSignerOrProvider from '../../utils/useSignerOrProvider';

export function validateENSName({ ensName }: { ensName: string }) {
Expand All @@ -33,11 +33,11 @@ export async function validateAddress({
address,
checkENS = true,
}: {
signerOrProvider: Signer | Providers;
signerOrProvider?: Signer | Providers;
address: string;
checkENS?: boolean;
}) {
if (couldBeENS(address) && checkENS) {
if (couldBeENS(address) && checkENS && signerOrProvider) {
const resolvedAddress = await signerOrProvider.resolveName(address).catch();
if (resolvedAddress) {
return {
Expand Down
Loading

0 comments on commit 4cdd6f1

Please sign in to comment.