diff --git a/src/components/header/RecoveryHeader.tsx b/src/components/header/RecoveryHeader.tsx index 53f8543..71a54ea 100644 --- a/src/components/header/RecoveryHeader.tsx +++ b/src/components/header/RecoveryHeader.tsx @@ -35,7 +35,7 @@ export default function RecoveryHeader() { return ( - + void }) { + const isMobile = useMediaQuery('isMobile') + const collectibleStore = useStore(CollectibleStore) const networkStore = useStore(NetworkStore) @@ -98,11 +111,16 @@ export default function CollectibleList({ {isImportCollectibleViewOpen && ( setIsImportCollectibleViewOpen(false)} contentProps={{ style: { scrollbarColor: 'gray black', - scrollbarWidth: 'thin' + scrollbarWidth: 'thin', + width: !isMobile ? '800px' : '100%', + minHeight: 'auto', + maxHeight: '80%', + overflow: 'hidden' } }} > diff --git a/src/components/wallet/collectibles/ImportCollectible.tsx b/src/components/wallet/collectibles/ImportCollectible.tsx index b6a3817..3449724 100644 --- a/src/components/wallet/collectibles/ImportCollectible.tsx +++ b/src/components/wallet/collectibles/ImportCollectible.tsx @@ -80,14 +80,19 @@ export default function ImportCollectible({ onClose }: { onClose: () => void }) useEffect(() => { const fetchCollectibleList = async () => { if (selectedNetwork && contractType) { - if (contractType === CollectibleContractTypeValues.ERC721) { - const data = await collectibleStore.getERC721List(selectedNetwork.chainId) - setCollectionList(data.tokens) - setCollectionListDate(new Date(data.date)) - } else if (contractType === CollectibleContractTypeValues.ERC1155) { - const data = await collectibleStore.getERC1155List(selectedNetwork.chainId) - setCollectionList(data.tokens) - setCollectionListDate(new Date(data.date)) + try { + if (contractType === CollectibleContractTypeValues.ERC721) { + const data = await collectibleStore.getERC721List(selectedNetwork.chainId) + setCollectionList(data.tokens) + setCollectionListDate(new Date(data.date)) + } else if (contractType === CollectibleContractTypeValues.ERC1155) { + const data = await collectibleStore.getERC1155List(selectedNetwork.chainId) + setCollectionList(data.tokens) + setCollectionListDate(new Date(data.date)) + } + } catch { + setCollectionList([]) + setCollectionListDate(undefined) } } } @@ -424,6 +429,7 @@ export default function ImportCollectible({ onClose }: { onClose: () => void }) fontWeight="semibold" color={contractType === CollectibleContractTypeValues.ERC721 ? 'text100' : 'text50'} paddingX="4" + cursor="pointer" > ERC721 @@ -444,6 +450,7 @@ export default function ImportCollectible({ onClose }: { onClose: () => void }) fontWeight="semibold" color={contractType === CollectibleContractTypeValues.ERC1155 ? 'text100' : 'text50'} paddingX="4" + cursor="pointer" > ERC1155 @@ -654,7 +661,13 @@ export default function ImportCollectible({ onClose }: { onClose: () => void })