Skip to content

Commit

Permalink
Fix #17848 - Ensure NFT collections toggle appropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Mar 9, 2023
1 parent 766c8a3 commit 288a9b7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ui/components/app/nfts-items/nfts-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,19 @@ export default function NftsItems({
};

const updateNftDropDownStateKey = (key, isExpanded) => {
const currentAccountNftDropdownState =
nftsDropdownState[selectedAddress][chainId];

const newCurrentAccountState = {
...currentAccountNftDropdownState,
...nftsDropdownState[selectedAddress][chainId],
[key]: !isExpanded,
};

nftsDropdownState[selectedAddress][chainId] = newCurrentAccountState;
const newState = {
...nftsDropdownState,
[selectedAddress]: {
[chainId]: newCurrentAccountState,
},
};

dispatch(updateNftDropDownState(nftsDropdownState));
dispatch(updateNftDropDownState(newState));
};

const renderCollection = ({ nfts, collectionName, collectionImage, key }) => {
Expand Down

0 comments on commit 288a9b7

Please sign in to comment.