diff --git a/packages/page-accounts/src/Vanity/Match.tsx b/packages/page-accounts/src/Vanity/Match.tsx index 9708f4acc8..d9ab2b213c 100644 --- a/packages/page-accounts/src/Vanity/Match.tsx +++ b/packages/page-accounts/src/Vanity/Match.tsx @@ -7,6 +7,8 @@ import styled from 'styled-components'; import { Button, IdentityIcon } from '@polkadot/react-components'; import { u8aToHex } from '@polkadot/util'; +import { useTranslation } from '../translate'; + interface Props { address: string; className?: string; @@ -18,16 +20,18 @@ interface Props { } function Match ({ address, className = '', count, offset, onCreateToggle, onRemove, seed }: Props): React.ReactElement { + const { t } = useTranslation(); + const hexSeed = useMemo( () => u8aToHex(seed), [seed] ); const _onCreate = useCallback( - (): void => onCreateToggle(hexSeed), + () => onCreateToggle(hexSeed), [hexSeed, onCreateToggle] ); const _onRemove = useCallback( - (): void => onRemove(address), + () => onRemove(address), [address, onRemove] ); @@ -53,6 +57,7 @@ function Match ({ address, className = '', count, offset, onCreateToggle, onRemo