Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show wallet address after hovering on wallet name #3713

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 40 additions & 9 deletions ui/components/NFTs/Filters/FilterList.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { Filter } from "@tallyho/tally-background/redux-slices/nfts"
import React from "react"
import React, { useCallback } from "react"
import { setSnackbarMessage } from "@tallyho/tally-background/redux-slices/ui"
import { useDispatch } from "react-redux"
import SharedSkeletonLoader from "../../Shared/SharedSkeletonLoader"
import SharedToggleItem from "../../Shared/SharedToggleItem"

const HEIGHT = 40

type FilterListProps = {
filters: Filter[]
isAccountFilter?: boolean
onChange: (filter: Filter) => void
isLoaded?: boolean
emptyMessage?: string
Expand All @@ -17,12 +20,23 @@
(props: FilterListProps, ref) => {
const {
filters,
isAccountFilter = false,
isLoaded = true,
onChange,
emptyMessage,
testid = "nft_filters_list",
} = props

const dispatch = useDispatch()

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should render a component

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:30:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display an empty message

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:43:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should render three items

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:56:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display a loading skeleton for items

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:69:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display labels correctly

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:83:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display thumbnail images correctly

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:97:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display a placeholder image if item doesn't have it

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:117:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should correctly display the state of the toggle buttons for items

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:134:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should render a component

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:30:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display an empty message

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:43:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should render three items

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:56:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display a loading skeleton for items

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:69:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display labels correctly

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:83:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display thumbnail images correctly

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:97:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should display a placeholder image if item doesn't have it

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:117:22)

Check failure on line 30 in ui/components/NFTs/Filters/FilterList.tsx

View workflow job for this annotation

GitHub Actions / test

FilterList › should correctly display the state of the toggle buttons for items

could not find react-redux context value; please ensure the component is wrapped in a <Provider> at useReduxContext (ui/node_modules/react-redux/lib/hooks/useReduxContext.js:30:11) at useStore (ui/node_modules/react-redux/lib/hooks/useStore.js:28:28) at useDispatch (ui/node_modules/react-redux/lib/hooks/useDispatch.js:24:17) at ui/components/NFTs/Filters/FilterList.tsx:30:33 at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:16305:18) at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:19226:20) at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21636:16) at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14) at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12) at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5) at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7) at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20) at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22) at flushActQueue (node_modules/react/cjs/react.development.js:2667:24) at act (node_modules/react/cjs/react.development.js:2582:11) at node_modules/@testing-library/react/dist/act-compat.js:46:25 at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26) at render (node_modules/@testing-library/react/dist/pure.js:247:10) at Object.<anonymous> (ui/components/NFTs/Filters/__tests__/FilterList.test.tsx:134:22)

const copyAddress = useCallback(
(address: string) => {
navigator.clipboard.writeText(address)
dispatch(setSnackbarMessage("Address copied to clipboard"))
},
[dispatch],
)

return (
<div ref={ref} className="filter_list" data-testid={testid}>
{filters.length > 0 ? (
Expand All @@ -33,14 +47,31 @@
isLoaded={isLoaded}
height={HEIGHT}
>
<SharedToggleItem
label={item.name}
thumbnailURL={item?.thumbnailURL}
checked={item.isEnabled}
onChange={(toggleValue) =>
onChange({ ...item, isEnabled: toggleValue })
}
/>
{isAccountFilter ? (
<button
type="button"
onClick={() => copyAddress(item.id)}
title={`Copy to clipboard:\n${item.id}`}
>
<SharedToggleItem
label={item.name}
thumbnailURL={item?.thumbnailURL}
checked={item.isEnabled}
onChange={(toggleValue) =>
onChange({ ...item, isEnabled: toggleValue })
}
/>
</button>
) : (
<SharedToggleItem
label={item.name}
thumbnailURL={item?.thumbnailURL}
checked={item.isEnabled}
onChange={(toggleValue) =>
onChange({ ...item, isEnabled: toggleValue })
}
/>
)}
</SharedSkeletonLoader>
))}
</>
Expand Down
1 change: 1 addition & 0 deletions ui/components/NFTs/Filters/NFTsFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export default function NFTsFilters(): ReactElement {
<span className="filter_title">{t("accountsTitle")}</span>
<FilterList
filters={filters.accounts}
isAccountFilter
onChange={handleUpdateAccountFilter}
testid="nft_account_filters"
/>
Expand Down
Loading