diff --git a/src/components/DaoCreator/formComponents/EstablishEssentials.tsx b/src/components/DaoCreator/formComponents/EstablishEssentials.tsx
index 825b19e5bb..41fdad3115 100644
--- a/src/components/DaoCreator/formComponents/EstablishEssentials.tsx
+++ b/src/components/DaoCreator/formComponents/EstablishEssentials.tsx
@@ -5,7 +5,7 @@ import { URL_DOCS_GOV_TYPES } from '../../../constants/url';
import { createAccountSubstring } from '../../../hooks/utils/useDisplayName';
import { useFractal } from '../../../providers/App/AppProvider';
import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider';
-import { ICreationStepProps, VotingStrategyType, GovernanceType } from '../../../types';
+import { GovernanceType, ICreationStepProps, VotingStrategyType } from '../../../types';
import { InputComponent, LabelComponent } from '../../ui/forms/InputComponent';
import LabelWrapper from '../../ui/forms/LabelWrapper';
import { RadioWithText } from '../../ui/forms/Radio/RadioWithText';
@@ -34,7 +34,7 @@ export function EstablishEssentials(props: ICreationStepProps) {
setFieldValue('essentials.daoName', daoName, false);
if (createAccountSubstring(daoAddress!) !== daoName) {
// Pre-fill the snapshot URL form field when editing
- setFieldValue('essentials.snapshotENS', daoSnapshotENS || '', false);
+ setFieldValue('essentials.snapshotENS', daoSnapshotENS?.toLowerCase() || '', false);
}
}
}, [setFieldValue, mode, daoName, daoSnapshotENS, isEdit, daoAddress]);
@@ -70,7 +70,7 @@ export function EstablishEssentials(props: ICreationStepProps) {
helper={t('helperDAOName')}
isRequired
value={values.essentials.daoName}
- id="searchEssentials-daoName"
+ id="essentials-daoName"
onChange={cEvent => setFieldValue('essentials.daoName', cEvent.target.value, true)}
onBlur={cEvent => setFieldValue('essentials.daoName', cEvent.target.value.trim(), true)}
disabled={daoNameDisabled}
diff --git a/src/components/Proposals/ProposalInfo.tsx b/src/components/Proposals/ProposalInfo.tsx
index 28ab8d34d4..36ca21466c 100644
--- a/src/components/Proposals/ProposalInfo.tsx
+++ b/src/components/Proposals/ProposalInfo.tsx
@@ -1,4 +1,4 @@
-import { Box, Flex, Button, Link } from '@chakra-ui/react';
+import { Box, Button, Flex, Link } from '@chakra-ui/react';
import { ArrowUpRight } from '@phosphor-icons/react';
import { useTranslation } from 'react-i18next';
import { Shield } from '../../assets/theme/custom/icons/Shield';
@@ -53,7 +53,9 @@ export function ProposalInfo({
/>
{isSnapshotProposal && (
<>
-
+
{(proposal as ExtendedSnapshotProposal).privacy === 'shutter' && (
{/* SNAPSHOT ICON LINK */}
- {node.daoSnapshotENS && }
+ {node.daoSnapshotENS && }
);
diff --git a/src/components/ui/cards/DAONodeInfoCard.tsx b/src/components/ui/cards/DAONodeInfoCard.tsx
index cfc80884be..2938dcc2f8 100644
--- a/src/components/ui/cards/DAONodeInfoCard.tsx
+++ b/src/components/ui/cards/DAONodeInfoCard.tsx
@@ -1,10 +1,10 @@
-import { Flex, Text, FlexProps, Link, Center, VStack } from '@chakra-ui/react';
+import { Center, Flex, FlexProps, Link, Text, VStack } from '@chakra-ui/react';
import { Link as RouterLink } from 'react-router-dom';
import { DAO_ROUTES } from '../../../constants/routes';
import useDisplayName from '../../../hooks/utils/useDisplayName';
import { useFractal } from '../../../providers/App/AppProvider';
import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider';
-import { FreezeGuard, FractalGuardContracts, FractalNode } from '../../../types';
+import { FractalGuardContracts, FractalNode, FreezeGuard } from '../../../types';
import { SnapshotButton } from '../badges/Snapshot';
import { FavoriteIcon } from '../icons/FavoriteIcon';
import AddressCopier from '../links/AddressCopier';
@@ -104,7 +104,9 @@ export function DAONodeInfoCard({ node, freezeGuard, guardContracts, ...rest }:
/>
{/* SNAPSHOT ICON LINK */}
- {node.daoSnapshotENS && }
+ {node.daoSnapshotENS && (
+
+ )}
{/* DAO ADDRESS */}
diff --git a/src/components/ui/forms/ABISelector.tsx b/src/components/ui/forms/ABISelector.tsx
index 17b6666cd7..886df3b685 100644
--- a/src/components/ui/forms/ABISelector.tsx
+++ b/src/components/ui/forms/ABISelector.tsx
@@ -1,7 +1,7 @@
import { Select, Text } from '@chakra-ui/react';
import axios from 'axios';
import detectProxyTarget from 'evm-proxy-detection';
-import { useMemo, useState, useEffect } from 'react';
+import { useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { isAddress } from 'viem';
import { useEnsAddress, usePublicClient } from 'wagmi';
@@ -28,7 +28,7 @@ export default function ABISelector({ target, onChange }: IABISelector) {
const [abi, setABI] = useState([]);
const { etherscanAPIUrl } = useNetworkConfig();
const { t } = useTranslation('common');
- const { data: ensAddress } = useEnsAddress({ name: target });
+ const { data: ensAddress } = useEnsAddress({ name: target?.toLowerCase() });
const client = usePublicClient();
useEffect(() => {
diff --git a/src/hooks/DAO/loaders/snapshot/useSnapshotSpaceName.ts b/src/hooks/DAO/loaders/snapshot/useSnapshotSpaceName.ts
index d47fa442ef..f73deff3cc 100644
--- a/src/hooks/DAO/loaders/snapshot/useSnapshotSpaceName.ts
+++ b/src/hooks/DAO/loaders/snapshot/useSnapshotSpaceName.ts
@@ -5,5 +5,5 @@ export default function useSnapshotSpaceName() {
node: { daoSnapshotENS },
} = useFractal();
- return daoSnapshotENS;
+ return daoSnapshotENS?.toLowerCase();
}
diff --git a/src/hooks/DAO/loaders/useFractalNode.ts b/src/hooks/DAO/loaders/useFractalNode.ts
index 2de5dcd406..6670113435 100644
--- a/src/hooks/DAO/loaders/useFractalNode.ts
+++ b/src/hooks/DAO/loaders/useFractalNode.ts
@@ -53,7 +53,7 @@ export const useFractalNode = (
},
daoName: name as string,
daoAddress: getAddress(_daoAddress),
- daoSnapshotENS: snapshotENS as string,
+ daoSnapshotENS: snapshotENS?.toLowerCase() as string,
proposalTemplatesHash: proposalTemplatesHash as string,
};
return currentNode;
diff --git a/src/hooks/DAO/loaders/useLoadDAONode.ts b/src/hooks/DAO/loaders/useLoadDAONode.ts
index 4d7ca59683..de8b7d0b58 100644
--- a/src/hooks/DAO/loaders/useLoadDAONode.ts
+++ b/src/hooks/DAO/loaders/useLoadDAONode.ts
@@ -1,6 +1,6 @@
import { useLazyQuery } from '@apollo/client';
import { useCallback } from 'react';
-import { isAddress, getAddress } from 'viem';
+import { getAddress, isAddress } from 'viem';
import { DAO, DAOQueryDocument, DAOQueryQuery } from '../../../../.graphclient';
import { logError } from '../../../helpers/errorLogging';
import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI';
@@ -42,7 +42,7 @@ export const useLoadDAONode = () => {
},
daoName: name as string,
daoAddress: getAddress(_daoAddress),
- daoSnapshotENS: snapshotENS as string,
+ daoSnapshotENS: snapshotENS?.toLowerCase() as string,
};
return currentNode;
}
diff --git a/src/hooks/DAO/useGetDAOName.ts b/src/hooks/DAO/useGetDAOName.ts
index b522d0e0a0..f7da701c2d 100644
--- a/src/hooks/DAO/useGetDAOName.ts
+++ b/src/hooks/DAO/useGetDAOName.ts
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState } from 'react';
-import { Address, PublicClient, getContract, parseAbi, getAddress } from 'viem';
+import { Address, PublicClient, getAddress, getContract, parseAbi } from 'viem';
import { usePublicClient } from 'wagmi';
import { useFractal } from '../../providers/App/AppProvider';
import { FractalContracts } from '../../types';
@@ -22,7 +22,7 @@ const getDAOName = async ({
throw new Error('Public client not available');
}
- const ensName = await publicClient.getEnsName({ address: address }).catch((error: Error) => {
+ const ensName = await publicClient.getEnsName({ address }).catch((error: Error) => {
if (error.name === 'ChainDoesNotSupportContract') {
// Sliently fail, this is fine.
// https://github.com/wevm/viem/discussions/781
diff --git a/src/hooks/utils/useAvatar.ts b/src/hooks/utils/useAvatar.ts
index 09b1bb8a44..f12cdb4b47 100644
--- a/src/hooks/utils/useAvatar.ts
+++ b/src/hooks/utils/useAvatar.ts
@@ -4,7 +4,7 @@ import { useNetworkConfig } from '../../providers/NetworkConfig/NetworkConfigPro
const useAvatar = (name: string) => {
const { chain } = useNetworkConfig();
const { data: avatarURL } = useEnsAvatar({
- name: name,
+ name: name?.toLowerCase(),
chainId: chain.id,
});
diff --git a/src/models/DaoTxBuilder.ts b/src/models/DaoTxBuilder.ts
index 46b2f28aa5..22a233de03 100644
--- a/src/models/DaoTxBuilder.ts
+++ b/src/models/DaoTxBuilder.ts
@@ -3,12 +3,12 @@ import { zeroAddress } from 'viem';
import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts';
import { buildContractCall, encodeMultiSend } from '../helpers';
import {
- BaseContracts,
- SafeMultisigDAO,
- SafeTransaction,
AzoriusContracts,
AzoriusERC20DAO,
AzoriusERC721DAO,
+ BaseContracts,
+ SafeMultisigDAO,
+ SafeTransaction,
VotingStrategyType,
} from '../types';
import { BaseTxBuilder } from './BaseTxBuilder';
@@ -228,7 +228,7 @@ export class DaoTxBuilder extends BaseTxBuilder {
return buildContractCall(
this.baseContracts.keyValuePairsContract,
'updateValues',
- [['snapshotENS'], [this.daoData.snapshotENS]],
+ [['snapshotENS'], [this.daoData.snapshotENS.toLowerCase()]],
0,
false,
);