Skip to content

Commit

Permalink
Actually yeah, just don't truncate it
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgall committed Oct 18, 2024
1 parent df966cd commit daa75eb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/pages/Roles/forms/RoleFormInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { DETAILS_BOX_SHADOW } from '../../../../constants/common';
import useAddress from '../../../../hooks/utils/useAddress';
import { useGetAccountName } from '../../../../hooks/utils/useGetAccountName';
import { AddressInput } from '../../../ui/forms/EthAddressInput';
import { InputComponent, TextareaComponent } from '../../../ui/forms/InputComponent';
import LabelWrapper from '../../../ui/forms/LabelWrapper';
Expand All @@ -16,14 +17,16 @@ export default function RoleFormInfo() {
const { address: resolvedWearerAddress, isValid: isValidWearerAddress } =
useAddress(roleWearerString);

const { setFieldValue } = useFormikContext<RoleFormValues>();
const { setFieldValue, values } = useFormikContext<RoleFormValues>();

useEffect(() => {
if (isValidWearerAddress) {
setFieldValue('roleEditing.resolvedWearer', resolvedWearerAddress);
}
}, [isValidWearerAddress, resolvedWearerAddress, setFieldValue]);

const { displayName } = useGetAccountName(values.roleEditing?.resolvedWearer, false);

return (
<Box
px={{ base: '1rem', md: 0 }}
Expand Down Expand Up @@ -101,7 +104,7 @@ export default function RoleFormInfo() {
labelColor="neutral-7"
>
<AddressInput
value={field.value}
value={displayName ?? field.value}
onBlur={() => {
setFieldTouched(field.name, true);
}}
Expand Down

0 comments on commit daa75eb

Please sign in to comment.