diff --git a/apps/browser-extension-wallet/src/utils/is-shared-wallet.ts b/apps/browser-extension-wallet/src/utils/is-shared-wallet.ts index 66da802ef4..25f39af983 100644 --- a/apps/browser-extension-wallet/src/utils/is-shared-wallet.ts +++ b/apps/browser-extension-wallet/src/utils/is-shared-wallet.ts @@ -40,8 +40,7 @@ export const getSharedWalletSignPolicy = (script: Wallet.Cardano.Script): SignPo if (Wallet.Cardano.isNativeScript(script) && isValidSharedWalletScript(script) && isSharedWalletScriptKind(script)) { const signers = script.scripts - // eslint-disable-next-line unicorn/no-array-callback-reference - .filter(isRequireSignatureScriptKind) + .filter((s): s is Wallet.Cardano.RequireSignatureScript => isRequireSignatureScriptKind(s)) .map(({ keyHash }: Wallet.Cardano.RequireSignatureScript) => ({ keyHash })); let required; diff --git a/packages/staking/src/features/BrowsePools/StakePoolsList/StakePoolsList.tsx b/packages/staking/src/features/BrowsePools/StakePoolsList/StakePoolsList.tsx index 107e9ad378..467c43a9fd 100644 --- a/packages/staking/src/features/BrowsePools/StakePoolsList/StakePoolsList.tsx +++ b/packages/staking/src/features/BrowsePools/StakePoolsList/StakePoolsList.tsx @@ -1,4 +1,6 @@ +/* eslint-disable react/no-multi-comp */ import { Box, Flex, Table, Text, useVisibleItemsCount } from '@input-output-hk/lace-ui-toolkit'; +import { useOutsideHandles } from 'features/outside-handles-provider'; import React, { ReactElement, useEffect, useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { ListRange } from 'react-virtuoso'; @@ -10,8 +12,13 @@ import { StakePoolsListHeader } from './StakePoolsListHeader'; import { StakePoolsListRow } from './StakePoolsListRow'; import { StakePoolsListRowSkeleton } from './StakePoolsListRowSkeleton'; +const WrappedStakePoolsListRowSkeleton = ({ index }: { index: number }) => { + const { isSharedWallet } = useOutsideHandles(); + return ; +}; + const itemContent = (index: number, data: StakePoolDetails | undefined): React.ReactElement => - data ? : ; + data ? : ; export type StakePoolsListProps = { scrollableTargetId: string; diff --git a/packages/staking/src/features/BrowsePools/StakePoolsList/StakePoolsListRowSkeleton/StakePoolsListRowSkeleton.tsx b/packages/staking/src/features/BrowsePools/StakePoolsList/StakePoolsListRowSkeleton/StakePoolsListRowSkeleton.tsx index cff5255c11..a89c10a615 100644 --- a/packages/staking/src/features/BrowsePools/StakePoolsList/StakePoolsListRowSkeleton/StakePoolsListRowSkeleton.tsx +++ b/packages/staking/src/features/BrowsePools/StakePoolsList/StakePoolsListRowSkeleton/StakePoolsListRowSkeleton.tsx @@ -1,6 +1,5 @@ import { Box, Flex } from '@input-output-hk/lace-ui-toolkit'; import cn from 'classnames'; -import { useOutsideHandles } from 'features/outside-handles-provider'; import { stakePoolCellPlaceholderRenderer } from './StakePoolSkeletonCellRenderer'; import * as styles from './StakePoolsListRowSkeleton.css'; @@ -8,28 +7,26 @@ export type StakePoolsListRowSkeletonProps = { index: number; columns: E[]; dataTestId?: string; + withSelection?: boolean; }; export const StakePoolsListRowSkeleton = ({ index, columns, dataTestId, -}: StakePoolsListRowSkeletonProps) => { - const { isSharedWallet } = useOutsideHandles(); - - return ( -
- {!isSharedWallet && } - {columns.map((cell, cellIndex) => ( - - {stakePoolCellPlaceholderRenderer(index + cellIndex)} - - ))} -
- ); -}; + withSelection, +}: StakePoolsListRowSkeletonProps) => ( +
+ {withSelection && } + {columns.map((cell, cellIndex) => ( + + {stakePoolCellPlaceholderRenderer(index + cellIndex)} + + ))} +
+);