diff --git a/src/app/components/account/account-list-item.layout.tsx b/src/app/components/account/account-list-item.layout.tsx index f353437b7ec..79f95f4237b 100644 --- a/src/app/components/account/account-list-item.layout.tsx +++ b/src/app/components/account/account-list-item.layout.tsx @@ -44,7 +44,6 @@ export function AccountListItemLayout(props: AccountListItemLayoutProps) { color="accent.text-subdued" position="absolute" right={0} - size="18px" top="calc(50% - 8px)" /> ) : ( diff --git a/src/app/components/available-balance.tsx b/src/app/components/available-balance.tsx index 8a401e9ad4c..7b6c66e8756 100644 --- a/src/app/components/available-balance.tsx +++ b/src/app/components/available-balance.tsx @@ -20,7 +20,7 @@ export function AvailableBalance(props: { balance: Money; balanceTooltipLabel?: - + diff --git a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-icon.tsx b/src/app/components/bitcoin-transaction-item/bitcoin-transaction-icon.tsx index 653d3dd9eee..2cb6caa1193 100644 --- a/src/app/components/bitcoin-transaction-item/bitcoin-transaction-icon.tsx +++ b/src/app/components/bitcoin-transaction-item/bitcoin-transaction-icon.tsx @@ -8,8 +8,8 @@ import { ArrowUpIcon } from '@app/ui/icons/arrow-up-icon'; function TxStatusIcon(props: { address: string; tx: BitcoinTx }) { const { address, tx } = props; - if (isBitcoinTxInbound(address, tx)) return ; - return ; + if (isBitcoinTxInbound(address, tx)) return ; + return ; } interface TransactionIconProps extends CircleProps { diff --git a/src/app/components/fees-row/components/fee-estimate-item.tsx b/src/app/components/fees-row/components/fee-estimate-item.tsx index dd009f61693..cb4227027f3 100644 --- a/src/app/components/fees-row/components/fee-estimate-item.tsx +++ b/src/app/components/fees-row/components/fee-estimate-item.tsx @@ -25,7 +25,7 @@ export function FeeEstimateItem({ }: FeeEstimateItemProps) { const selectedIcon = useMemo(() => { const isSelected = index === selectedItem; - return isSelected ? : <>; + return isSelected ? : <>; }, [index, selectedItem]); return ( @@ -47,7 +47,7 @@ export function FeeEstimateItem({ > {labels[index]} - {!disableFeeSelection && (isVisible ? selectedIcon : )} + {!disableFeeSelection && (isVisible ? selectedIcon : )} ); diff --git a/src/app/components/fees-row/components/fees-row.layout.tsx b/src/app/components/fees-row/components/fees-row.layout.tsx index bc82a82eb8d..b93a895da17 100644 --- a/src/app/components/fees-row/components/fees-row.layout.tsx +++ b/src/app/components/fees-row/components/fees-row.layout.tsx @@ -33,7 +33,7 @@ export function FeesRowLayout(props: FeesRowLayoutProps) { openInNewTab(url)} - width="xs" + variant="small" /> diff --git a/src/app/components/stacks-transaction-item/increase-fee-button.tsx b/src/app/components/stacks-transaction-item/increase-fee-button.tsx index ceb1a3dc41d..46e635494f6 100644 --- a/src/app/components/stacks-transaction-item/increase-fee-button.tsx +++ b/src/app/components/stacks-transaction-item/increase-fee-button.tsx @@ -30,8 +30,8 @@ export function IncreaseFeeButton(props: IncreaseFeeButtonProps) { type="button" zIndex={999} > - - + + Increase fee diff --git a/src/app/components/transaction/token-transfer-icon.tsx b/src/app/components/transaction/token-transfer-icon.tsx index 80aba1289a5..3785f97c668 100644 --- a/src/app/components/transaction/token-transfer-icon.tsx +++ b/src/app/components/transaction/token-transfer-icon.tsx @@ -9,7 +9,7 @@ export function TokenTransferIcon(props: { tx: StacksTx }) { const currentAccountStxAddress = useCurrentAccountStxAddressState(); const isSent = tx.sender_address === currentAccountStxAddress; - if (isSent) return ; + if (isSent) return ; - return ; + return ; } diff --git a/src/app/components/transaction/transaction-icon.tsx b/src/app/components/transaction/transaction-icon.tsx index aa7bb1e70d4..77a5e2bda4e 100644 --- a/src/app/components/transaction/transaction-icon.tsx +++ b/src/app/components/transaction/transaction-icon.tsx @@ -11,9 +11,9 @@ export function TransactionIcon(props: { tx: StacksTx }) { switch (tx.tx_type) { case 'coinbase': - return ; + return ; case 'smart_contract': - return ; + return ; case 'token_transfer': return ; case 'contract_call': diff --git a/src/app/features/activity-list/components/transaction-list/stacks-transaction/ft-transfer-item.tsx b/src/app/features/activity-list/components/transaction-list/stacks-transaction/ft-transfer-item.tsx index 5fcd925eb79..7a3a1e5151f 100644 --- a/src/app/features/activity-list/components/transaction-list/stacks-transaction/ft-transfer-item.tsx +++ b/src/app/features/activity-list/components/transaction-list/stacks-transaction/ft-transfer-item.tsx @@ -49,7 +49,7 @@ export function FtTransferItem({ ftTransfer, parentTx }: FtTransferItemProps) { assetMetadata.image_canonical_uri && assetMetadata.name && getImageCanonicalUri(assetMetadata.image_canonical_uri, assetMetadata.name); - const icon = isOriginator ? : ; + const icon = isOriginator ? : ; const title = `${assetMetadata.name || 'Token'} Transfer`; const value = `${isOriginator ? '-' : ''}${displayAmount.toFormat()}`; const transferIcon = ftImageCanonicalUri ? ( diff --git a/src/app/features/activity-list/components/transaction-list/stacks-transaction/stx-transfer-item.tsx b/src/app/features/activity-list/components/transaction-list/stacks-transaction/stx-transfer-item.tsx index 393e42920fa..be853b65956 100644 --- a/src/app/features/activity-list/components/transaction-list/stacks-transaction/stx-transfer-item.tsx +++ b/src/app/features/activity-list/components/transaction-list/stacks-transaction/stx-transfer-item.tsx @@ -23,7 +23,7 @@ export function StxTransferItem({ stxTransfer, parentTx }: StxTransferItemProps) const isOriginator = stxTransfer.sender === currentAccount?.address; const caption = getTxCaption(parentTx.tx) ?? ''; - const icon = isOriginator ? : ; + const icon = isOriginator ? : ; const title = 'Stacks Token Transfer'; const value = `${isOriginator ? '-' : ''}${stacksValue({ value: stxTransfer.amount, diff --git a/src/app/features/collectibles/components/collectibes.layout.tsx b/src/app/features/collectibles/components/collectibes.layout.tsx index 106ecedf1a5..0b76464de15 100644 --- a/src/app/features/collectibles/components/collectibes.layout.tsx +++ b/src/app/features/collectibles/components/collectibes.layout.tsx @@ -3,7 +3,7 @@ import { token } from 'leather-styles/tokens'; import { LoadingSpinner } from '@app/components/loading-spinner'; import { Spinner } from '@app/ui/components/spinner'; -import { ReloadIcon } from '@app/ui/icons/reload-icon'; +import { RefreshIcon } from '@app/ui/icons/refresh-icon'; interface CollectiblesLayoutProps { title: string; @@ -27,9 +27,9 @@ export function CollectiblesLayout({ {title} {isLoading ? ( - + ) : ( - onRefresh()} /> + onRefresh()} variant="small" /> )} {subHeader} diff --git a/src/app/features/collectibles/components/image-unavailable.tsx b/src/app/features/collectibles/components/image-unavailable.tsx index 1c4af16722c..309beed9a49 100644 --- a/src/app/features/collectibles/components/image-unavailable.tsx +++ b/src/app/features/collectibles/components/image-unavailable.tsx @@ -7,7 +7,7 @@ import { CollectiblePlaceholderLayout } from './_collectible-types/collectible-p export function ImageUnavailable() { return ( - + Image currently unavailable diff --git a/src/app/features/feedback-button/feedback-button.tsx b/src/app/features/feedback-button/feedback-button.tsx index eb90f25d5b2..a4a50951090 100644 --- a/src/app/features/feedback-button/feedback-button.tsx +++ b/src/app/features/feedback-button/feedback-button.tsx @@ -42,7 +42,7 @@ export function FeedbackButton() { onClick={openFeedbackDialog} > - + Give feedback diff --git a/src/app/features/ledger/components/ledger-screen-detail.tsx b/src/app/features/ledger/components/ledger-screen-detail.tsx index 89d353c8642..9c9cac7e5f3 100644 --- a/src/app/features/ledger/components/ledger-screen-detail.tsx +++ b/src/app/features/ledger/components/ledger-screen-detail.tsx @@ -1,5 +1,4 @@ import { Flex, styled } from 'leather-styles/jsx'; -import { token } from 'leather-styles/tokens'; import { BasicTooltip } from '@app/ui/components/tooltip/basic-tooltip'; import { Caption } from '@app/ui/components/typography/caption'; @@ -21,10 +20,10 @@ export function LedgerScreenDetail(props: LedgerScreenDetailProps) { {title} diff --git a/src/app/features/message-signer/hash-drawer.tsx b/src/app/features/message-signer/hash-drawer.tsx index 6534674ae77..af2bfe91359 100644 --- a/src/app/features/message-signer/hash-drawer.tsx +++ b/src/app/features/message-signer/hash-drawer.tsx @@ -10,7 +10,7 @@ interface ShowHashButtonProps { } function ShowHashButton(props: ShowHashButtonProps) { const { expanded } = props; - return expanded ? : ; + return expanded ? : ; } interface HashDrawerProps { diff --git a/src/app/features/psbt-signer/components/psbt-request-details-header.tsx b/src/app/features/psbt-signer/components/psbt-request-details-header.tsx index b349638e794..f89ed659e7f 100644 --- a/src/app/features/psbt-signer/components/psbt-request-details-header.tsx +++ b/src/app/features/psbt-signer/components/psbt-request-details-header.tsx @@ -31,9 +31,9 @@ export function PsbtRequestDetailsHeader() { > {isPsbtMutable ? ( - + ) : ( - + )} - + Fast checkout diff --git a/src/app/pages/fund/components/zero-percent-fees-badge.tsx b/src/app/pages/fund/components/zero-percent-fees-badge.tsx index a6d78aee9ff..6df4bb75f06 100644 --- a/src/app/pages/fund/components/zero-percent-fees-badge.tsx +++ b/src/app/pages/fund/components/zero-percent-fees-badge.tsx @@ -14,7 +14,7 @@ export function ZeroPercentFeesBadge() { paddingY="space.01" gap="space.01" > - + 0 % Fees diff --git a/src/app/pages/home/components/account-actions.tsx b/src/app/pages/home/components/account-actions.tsx index b59973a1d4c..02ac19609f8 100644 --- a/src/app/pages/home/components/account-actions.tsx +++ b/src/app/pages/home/components/account-actions.tsx @@ -34,7 +34,7 @@ export function AccountActions(props: FlexProps) { } + icon={} label="Receive" onClick={() => navigate(receivePath, { state: { backgroundLocation: location } })} /> @@ -42,7 +42,7 @@ export function AccountActions(props: FlexProps) { {(!!stacksAccount || !!btcAccount) && ( } + icon={} label="Buy" onClick={() => navigate(RouteUrls.FundChooseCurrency)} /> @@ -51,7 +51,7 @@ export function AccountActions(props: FlexProps) { [ChainID.Mainnet]: ( } + icon={} label="Swap" onClick={() => navigate(RouteUrls.Swap)} /> diff --git a/src/app/pages/home/components/account-info-card.tsx b/src/app/pages/home/components/account-info-card.tsx index 751044fdc6b..51af4414422 100644 --- a/src/app/pages/home/components/account-info-card.tsx +++ b/src/app/pages/home/components/account-info-card.tsx @@ -39,7 +39,7 @@ export function AccountInfoCard() { {name} - + diff --git a/src/app/pages/home/components/send-button.tsx b/src/app/pages/home/components/send-button.tsx index d871a6c65da..76fc5aa68d0 100644 --- a/src/app/pages/home/components/send-button.tsx +++ b/src/app/pages/home/components/send-button.tsx @@ -29,7 +29,7 @@ function SendButtonSuspense() { } + icon={} onClick={() => whenWallet({ ledger: () => @@ -45,9 +45,7 @@ function SendButtonSuspense() { ); } -const SendButtonFallback = memo(() => ( - } disabled /> -)); +const SendButtonFallback = memo(() => } disabled />); export function SendButton() { return ( diff --git a/src/app/pages/send/send-crypto-asset-form/components/recipient-type-dropdown/components/recipient-dropdown-item.tsx b/src/app/pages/send/send-crypto-asset-form/components/recipient-type-dropdown/components/recipient-dropdown-item.tsx index 0f2dadfc72e..75be88e61be 100644 --- a/src/app/pages/send/send-crypto-asset-form/components/recipient-type-dropdown/components/recipient-dropdown-item.tsx +++ b/src/app/pages/send/send-crypto-asset-form/components/recipient-type-dropdown/components/recipient-dropdown-item.tsx @@ -34,7 +34,7 @@ export function RecipientDropdownItem({ > {labels[index]} - {isVisible ? <> : } + {isVisible ? <> : } ); diff --git a/src/app/pages/swap/components/select-asset-trigger-button.tsx b/src/app/pages/swap/components/select-asset-trigger-button.tsx index 5a15462b376..c364a4aadf2 100644 --- a/src/app/pages/swap/components/select-asset-trigger-button.tsx +++ b/src/app/pages/swap/components/select-asset-trigger-button.tsx @@ -30,7 +30,7 @@ export function SelectAssetTriggerButton({ {icon && } {symbol} - + ); diff --git a/src/app/pages/swap/components/swap-details/swap-details.tsx b/src/app/pages/swap/components/swap-details/swap-details.tsx index 4a8d4fd4d53..4314ddc3717 100644 --- a/src/app/pages/swap/components/swap-details/swap-details.tsx +++ b/src/app/pages/swap/components/swap-details/swap-details.tsx @@ -22,7 +22,7 @@ function RouteNames(props: { swapSubmissionData: SwapSubmissionData }) { return ( {route.name} - {insertIcon && } + {insertIcon && } ); }); diff --git a/src/app/pages/swap/components/swap-toggle-button.tsx b/src/app/pages/swap/components/swap-toggle-button.tsx index ba9ca9beb5c..bd02266c8e4 100644 --- a/src/app/pages/swap/components/swap-toggle-button.tsx +++ b/src/app/pages/swap/components/swap-toggle-button.tsx @@ -44,7 +44,7 @@ export function SwapToggleButton() { onClick={onToggleSwapAssets} type="button" > - + ); } diff --git a/src/app/ui/components/button/button.stories.tsx b/src/app/ui/components/button/button.stories.tsx index aa917186955..db8f59fecbb 100644 --- a/src/app/ui/components/button/button.stories.tsx +++ b/src/app/ui/components/button/button.stories.tsx @@ -93,7 +93,7 @@ export const WithToken: Story = { Button - + ), trigger: true, diff --git a/src/app/ui/components/dowpdown-menu/dropdown-menu.stories.tsx b/src/app/ui/components/dowpdown-menu/dropdown-menu.stories.tsx index 1422e65adb8..dc4a27f9ce7 100644 --- a/src/app/ui/components/dowpdown-menu/dropdown-menu.stories.tsx +++ b/src/app/ui/components/dowpdown-menu/dropdown-menu.stories.tsx @@ -24,7 +24,7 @@ export const DropdownMenu: Story = { Options - + diff --git a/src/app/ui/components/item/item.layout.tsx b/src/app/ui/components/item/item.layout.tsx index 4d0cbcde9e1..236e96144c7 100644 --- a/src/app/ui/components/item/item.layout.tsx +++ b/src/app/ui/components/item/item.layout.tsx @@ -45,7 +45,7 @@ export function ItemLayout({ {titleLeft} )} - {isSelected && } + {isSelected && } {isValidElement(captionLeft) ? ( captionLeft @@ -72,7 +72,9 @@ export function ItemLayout({ )} - {showChevron && } + {showChevron && ( + + )} diff --git a/src/app/ui/components/select/select.stories.tsx b/src/app/ui/components/select/select.stories.tsx index 7fd9f294228..ce31ac46c23 100644 --- a/src/app/ui/components/select/select.stories.tsx +++ b/src/app/ui/components/select/select.stories.tsx @@ -1,9 +1,10 @@ import type { Meta, StoryObj } from '@storybook/react'; import { HStack, styled } from 'leather-styles/jsx'; -import { CheckmarkIcon } from '../../icons/checkmark-icon'; -import { ChevronDownIcon } from '../../icons/chevron-down-icon'; -import { PlaceholderIcon } from '../../icons/placeholder-icon'; +import { CheckmarkIcon } from '@app/ui/icons/checkmark-icon'; +import { ChevronDownIcon } from '@app/ui/icons/chevron-down-icon'; +import { PlaceholderIcon } from '@app/ui/icons/placeholder-icon'; + import { Select as Component, SelectItem } from './select'; import { SelectItemLayout } from './select-item.layout'; @@ -24,7 +25,7 @@ export const Select: Story = { - + @@ -42,7 +43,7 @@ export const Select: Story = { {item.label} - + } diff --git a/src/app/ui/components/spinner.tsx b/src/app/ui/components/spinner.tsx index 800268302a8..5ca57d6005a 100644 --- a/src/app/ui/components/spinner.tsx +++ b/src/app/ui/components/spinner.tsx @@ -9,7 +9,7 @@ interface SpinnerProps extends SquareProps { export function Spinner({ emptyColor = 'transparent', - size = '1.5rem', + size = 'sm', label = 'Loading...', thickness = '2px', speed = '0.85s', diff --git a/src/app/ui/components/tooltip/tooltip.stories.tsx b/src/app/ui/components/tooltip/tooltip.stories.tsx index 3ca05dc106d..bd41b1edc44 100644 --- a/src/app/ui/components/tooltip/tooltip.stories.tsx +++ b/src/app/ui/components/tooltip/tooltip.stories.tsx @@ -24,7 +24,7 @@ export const Tooltip: Story = { - + diff --git a/src/app/ui/icons/arrow-down-icon.tsx b/src/app/ui/icons/arrow-down-icon.tsx index 16454af1f0b..465190c2763 100644 --- a/src/app/ui/icons/arrow-down-icon.tsx +++ b/src/app/ui/icons/arrow-down-icon.tsx @@ -1,6 +1,19 @@ -import { Icon, IconProps } from './icon/icon'; +import { Icon, IconProps, IconSmall } from './icon/icon'; + +export function ArrowDownIcon({ variant, ...props }: IconProps) { + if (variant === 'small') + return ( + + + + ); -export function ArrowDownIcon(props: IconProps) { return ( + + + ); -export function ArrowLeftIcon(props: IconProps) { return ( + + + ); -export function ArrowUpIcon(props: IconProps) { return ( + + + ); -export function BitcoinIcon(props: IconProps) { return ( + + + ); -export function CheckmarkCircleIcon(props: IconProps) { return ( + + + ); -export function CheckmarkIcon(props: IconProps) { return ( + + + ); -export function ChevronDownIcon(props: IconProps) { return ( + + + ); -export function ChevronUpIcon(props: IconProps) { return ( + + + + ); -export function ChevronsRightIcon(props: IconProps) { return ( + + + ); -export function CircleIcon(props: IconProps) { return ( diff --git a/src/app/ui/icons/close-icon.tsx b/src/app/ui/icons/close-icon.tsx index eca53677613..4b23f9407f9 100644 --- a/src/app/ui/icons/close-icon.tsx +++ b/src/app/ui/icons/close-icon.tsx @@ -1,6 +1,18 @@ -import { Icon, IconProps } from './icon/icon'; +import { Icon, IconProps, IconSmall } from './icon/icon'; + +export function CloseIcon({ variant, ...props }: IconProps) { + if (variant === 'small') + return ( + + + + ); -export function CloseIcon(props: IconProps) { return ( diff --git a/src/app/ui/icons/cloud-off-icon.tsx b/src/app/ui/icons/cloud-off-icon.tsx index f83e7f5feb1..5d162933da9 100644 --- a/src/app/ui/icons/cloud-off-icon.tsx +++ b/src/app/ui/icons/cloud-off-icon.tsx @@ -1,6 +1,19 @@ -import { Icon, IconProps } from './icon/icon'; +import { Icon, IconProps, IconSmall } from './icon/icon'; + +export function CloudOffIcon({ variant, ...props }: IconProps) { + if (variant === 'small') + return ( + + + + ); -export function CloudOffIcon(props: IconProps) { return ( + + + ); -export function CodeIcon(props: IconProps) { return ( + + + ); -export function CopyIcon(props: IconProps) { return ( + + + ); -export function CreditCardIcon(props: IconProps) { return (
-

Small 16x16

+

Default 24x24

{iconsList.map(item => { const IconComponent = Icon[item]; @@ -36,13 +36,13 @@ import { iconsList } from './icons-list';
-

Medium 24x24

+

Small 16x16

{iconsList.map(item => { const IconComponent = Icon[item]; return ( - + ); })} diff --git a/src/app/ui/icons/download-icon.tsx b/src/app/ui/icons/download-icon.tsx index 6d71dcece1b..261dc111813 100644 --- a/src/app/ui/icons/download-icon.tsx +++ b/src/app/ui/icons/download-icon.tsx @@ -1,6 +1,19 @@ -import { Icon, IconProps } from './icon/icon'; +import { Icon, IconProps, IconSmall } from './icon/icon'; + +export function DownloadIcon({ variant, ...props }: IconProps) { + if (variant === 'small') + return ( + + + + ); -export function DownloadIcon(props: IconProps) { return ( + + + ); -export function EditIcon(props: IconProps) { return ( + + + + ); -export function ErrorCircleIcon(props: IconProps) { return ( diff --git a/src/app/ui/icons/error-icon.tsx b/src/app/ui/icons/error-icon.tsx index fce54b76709..b541d67fe40 100644 --- a/src/app/ui/icons/error-icon.tsx +++ b/src/app/ui/icons/error-icon.tsx @@ -1,6 +1,19 @@ -import { Icon, IconProps } from './icon/icon'; +import { Icon, IconProps, IconSmall } from './icon/icon'; + +export function ErrorIcon({ variant, ...props }: IconProps) { + if (variant === 'small') + return ( + + + + + ); -export function ErrorIcon(props: IconProps) { return ( + + + ); -export function ExitIcon(props: IconProps) { return ( + + + ); -export function ExpandIcon(props: IconProps) { return ( + + + ); -export function ExternalLinkIcon(props: IconProps) { return ( + + + ); -export function EyeIcon(props: IconProps) { return ( + + + ); -export function EyeSlashIcon(props: IconProps) { return ( + + + ); -export function FunctionIcon(props: IconProps) { return ( + + + ); -export function HamburgerIcon(props: IconProps) { return ( + + + ); -export function HeadsetIcon(props: IconProps) { return ( ; export const ExampleIcon: Story = { parameters: { - controls: { include: ['width'] }, + controls: { include: ['variant'] }, }, - args: { width: 'md' }, + args: { width: 'default' }, }; diff --git a/src/app/ui/icons/icon/icon.tsx b/src/app/ui/icons/icon/icon.tsx index b69925c2a6e..71689d92890 100644 --- a/src/app/ui/icons/icon/icon.tsx +++ b/src/app/ui/icons/icon/icon.tsx @@ -1,24 +1,22 @@ import { styled } from 'leather-styles/jsx'; import type { HTMLStyledProps } from 'leather-styles/types'; -export type IconProps = HTMLStyledProps<'svg'>; +type IconVariant = 'default' | 'small'; -export function Icon({ - children, - height = 'auto', - opacity = '1', - width = 'sm', - ...props -}: IconProps) { +export interface IconProps extends HTMLStyledProps<'svg'> { + variant?: IconVariant; +} +export function Icon({ children, opacity = '1', ...props }: IconProps) { + return ( + + {children} + + ); +} + +export function IconSmall({ children, opacity = '1', ...props }: IconProps) { return ( - + {children} ); diff --git a/src/app/ui/icons/inbox-icon.tsx b/src/app/ui/icons/inbox-icon.tsx index b9466523add..4648a508ac3 100644 --- a/src/app/ui/icons/inbox-icon.tsx +++ b/src/app/ui/icons/inbox-icon.tsx @@ -1,6 +1,19 @@ -import { Icon, IconProps } from './icon/icon'; +import { Icon, IconProps, IconSmall } from './icon/icon'; + +export function InboxIcon({ variant, ...props }: IconProps) { + if (variant === 'small') + return ( + + + + ); -export function InboxIcon(props: IconProps) { return ( + + + + ); -export function InfoCircleIcon(props: IconProps) { return ( + + + + ); -export function KeyIcon(props: IconProps) { return ( diff --git a/src/app/ui/icons/ledger-icon.tsx b/src/app/ui/icons/ledger-icon.tsx index 2a76fec1f10..e63fd272c9f 100644 --- a/src/app/ui/icons/ledger-icon.tsx +++ b/src/app/ui/icons/ledger-icon.tsx @@ -1,6 +1,16 @@ -import { Icon, IconProps } from './icon/icon'; +import { Icon, IconProps, IconSmall } from './icon/icon'; + +export function LedgerIcon({ variant, ...props }: IconProps) { + if (variant === 'small') + return ( + + + + ); -export function LedgerIcon(props: IconProps) { return ( diff --git a/src/app/ui/icons/list-icon.tsx b/src/app/ui/icons/list-icon.tsx index bca10955378..fa5275c65f4 100644 --- a/src/app/ui/icons/list-icon.tsx +++ b/src/app/ui/icons/list-icon.tsx @@ -1,6 +1,19 @@ -import { Icon, IconProps } from './icon/icon'; +import { Icon, IconProps, IconSmall } from './icon/icon'; + +export function ListIcon({ variant, ...props }: IconProps) { + if (variant === 'small') + return ( + + + + ); -export function ListIcon(props: IconProps) { return ( + + + ); -export function LockIcon(props: IconProps) { return ( + + + ); -export function MegaphoneIcon(props: IconProps) { return ( + + + + ); -export function MoonIcon(props: IconProps) { return ( + + + ); -export function PlusIcon(props: IconProps) { return ( + + + + + + + + + ); -export function QrCodeIcon(props: IconProps) { return ( + + + ); -export function QuestionCircleIcon(props: IconProps) { return ( + + + ); + + return ( + + + + ); +} diff --git a/src/app/ui/icons/reload-icon.tsx b/src/app/ui/icons/reload-icon.tsx index 95be65a5698..287ea1c3dda 100644 --- a/src/app/ui/icons/reload-icon.tsx +++ b/src/app/ui/icons/reload-icon.tsx @@ -1,6 +1,19 @@ -import { Icon, IconProps } from './icon/icon'; +import { Icon, IconProps, IconSmall } from './icon/icon'; + +export function ReloadIcon({ variant, ...props }: IconProps) { + if (variant === 'small') + return ( + + + + ); -export function ReloadIcon(props: IconProps) { return ( + + + ); -export function SendIcon(props: IconProps) { return ( + + + ); -export function StacksIcon(props: IconProps) { return ( + + + ); -export function StarIcon(props: IconProps) { return ( + + + + + + + + + + ); -export function SunIcon(props: IconProps) { return ( + + + + + + + + + + ); -export function SunInCloudIcon(props: IconProps) { return ( + + + ); -export function SupportIcon(props: IconProps) { return ( + + + ); -export function SwapIcon(props: IconProps) { return ( + + + ); -export function TrashIcon(props: IconProps) { return ( + + + ); -export function UnlockIcon(props: IconProps) { return ( + + + ); -export function WorldIcon(props: IconProps) { return ( + + + ); -export function ZapIcon(props: IconProps) { return ( { }, ], }, - stacksMainnetNetwork + stacksTestnetNetwork ) } > - Update profile (Mainnet) + Update profile (Testnet) { { name: 1, } as any, - stacksMainnetNetwork + stacksTestnetNetwork ) } > - Try to update invalid profile (Mainnet) + Try to update invalid profile (Testnet) diff --git a/tests/specs/profile/profile.spec.ts b/tests/specs/profile/profile.spec.ts index fe503453792..e04f3fa8aec 100644 --- a/tests/specs/profile/profile.spec.ts +++ b/tests/specs/profile/profile.spec.ts @@ -1,4 +1,3 @@ -import { Page } from '@playwright/test'; import { TestAppPage } from '@tests/page-object-models/test-app.page'; import { UpdateProfileRequestPage } from '@tests/page-object-models/update-profile-request.page'; @@ -9,19 +8,6 @@ test.describe.configure({ mode: 'serial' }); test.describe('Profile updating', () => { let testAppPage: TestAppPage; - function interceptGaiaRequest(page: Page): Promise { - return new Promise(resolve => { - page.on('request', request => { - if (request.url().startsWith('https://hub.blockstack.org/store')) { - const requestBody = request.postDataBuffer(); - if (request.method() === 'GET') return; - if (requestBody === null) return; - resolve(requestBody); - } - }); - }); - } - test.beforeEach(async ({ extensionId, globalPage, onboardingPage, context }) => { await globalPage.setupAndUseApiCalls(extensionId); await onboardingPage.signInWithTestAccount(extensionId); @@ -57,12 +43,21 @@ test.describe('Profile updating', () => { await testAppPage.clickUpdateProfileButton(); const profileUpdatingPage = new UpdateProfileRequestPage(await context.waitForEvent('page')); - const [gaiaRequestBody] = await Promise.all([ - interceptGaiaRequest(profileUpdatingPage.page), - profileUpdatingPage.clickUpdateProfileButton(), - ]); + const requestPromise = profileUpdatingPage.page.waitForRequest('https://hub.blockstack.org/*'); + + await profileUpdatingPage.page.route('https://hub.blockstack.org/*', async route => { + await route.abort(); + }); + + await profileUpdatingPage.clickUpdateProfileButton(); + + const request = await requestPromise; + const requestBody = request.postDataBuffer(); + if (!requestBody) return; + + const { decodedToken } = JSON.parse(requestBody.toString())[0]; - const { decodedToken } = JSON.parse(gaiaRequestBody.toString())[0]; + test.expect(decodedToken).toBeDefined(); test.expect(decodedToken?.header?.alg).toEqual('ES256K'); test.expect(decodedToken?.payload?.claim?.name).toContain('Name ');