From fe42cf763c3b27dc92c8604fd2759c1f9f373576 Mon Sep 17 00:00:00 2001 From: Kyrylo Klymenko Date: Wed, 14 Aug 2024 19:35:47 +0200 Subject: [PATCH 1/4] Transform daoSnapshotENS to lower case --- .../DaoCreator/formComponents/EstablishEssentials.tsx | 6 +++--- src/components/Proposals/ProposalInfo.tsx | 6 ++++-- .../pages/DaoSettings/components/MetadataContainer.tsx | 6 +++--- src/components/ui/cards/DAOInfoCard.tsx | 4 ++-- src/components/ui/cards/DAONodeInfoCard.tsx | 8 +++++--- src/components/ui/forms/ABISelector.tsx | 4 ++-- src/hooks/DAO/loaders/snapshot/useSnapshotSpaceName.ts | 2 +- src/hooks/DAO/loaders/useFractalNode.ts | 2 +- src/hooks/DAO/loaders/useLoadDAONode.ts | 4 ++-- src/hooks/DAO/useGetDAOName.ts | 4 ++-- src/hooks/utils/useAvatar.ts | 2 +- src/models/DaoTxBuilder.ts | 8 ++++---- 12 files changed, 30 insertions(+), 26 deletions(-) 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' && (