From 9d933e4d491f638ef91055d158e0e09b19bb7228 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Mon, 14 Oct 2024 15:35:01 +0200 Subject: [PATCH] Address PR comments and fix lint --- .../app/snaps/snap-ui-address/snap-ui-address.tsx | 3 +-- .../app/snaps/snap-ui-avatar/snap-ui-avatar.tsx | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ui/components/app/snaps/snap-ui-address/snap-ui-address.tsx b/ui/components/app/snaps/snap-ui-address/snap-ui-address.tsx index c634ac3177dc..539548622135 100644 --- a/ui/components/app/snaps/snap-ui-address/snap-ui-address.tsx +++ b/ui/components/app/snaps/snap-ui-address/snap-ui-address.tsx @@ -1,5 +1,4 @@ import React, { useMemo } from 'react'; -import { useSelector } from 'react-redux'; import { CaipAccountId, isHexString, @@ -19,7 +18,7 @@ export type SnapUIAddressProps = { // The address must be a CAIP-10 string. address: string; // This is not currently exposed to Snaps. - avatarSize?: string; + avatarSize?: 'xs' | 'sm' | 'md' | 'lg'; }; export const SnapUIAddress: React.FunctionComponent = ({ diff --git a/ui/components/app/snaps/snap-ui-avatar/snap-ui-avatar.tsx b/ui/components/app/snaps/snap-ui-avatar/snap-ui-avatar.tsx index 2f6d969a055f..7e6de5f3370b 100644 --- a/ui/components/app/snaps/snap-ui-avatar/snap-ui-avatar.tsx +++ b/ui/components/app/snaps/snap-ui-avatar/snap-ui-avatar.tsx @@ -6,16 +6,16 @@ import Jazzicon from '../../../ui/jazzicon'; import { getUseBlockie } from '../../../../selectors'; export const DIAMETERS: Record = { - 'xs': 16, - 'sm': 24, - 'md': 32, - 'lg': 40, + xs: 16, + sm: 24, + md: 32, + lg: 40, }; export type SnapUIAvatarProps = { // The address must be a CAIP-10 string. address: string; - size?: string; + size?: 'xs' | 'sm' | 'md' | 'lg'; }; export const SnapUIAvatar: React.FunctionComponent = ({