diff --git a/src/components/wallet/collectibles/ImportCollectible.tsx b/src/components/wallet/collectibles/ImportCollectible.tsx index 13f4bcb..b6a3817 100644 --- a/src/components/wallet/collectibles/ImportCollectible.tsx +++ b/src/components/wallet/collectibles/ImportCollectible.tsx @@ -5,6 +5,7 @@ import { ChevronLeftIcon, Divider, Image, + Modal, SearchIcon, Select, Spinner, @@ -45,6 +46,7 @@ export default function ImportCollectible({ onClose }: { onClose: () => void }) ) const [isAddingCollection, setIsAddingCollection] = useState(false) + const [confirmRefreshList, setConfirmRefreshList] = useState(false) const [collectionList, setCollectionList] = useState([]) const [collectionListDate, setCollectionListDate] = useState() @@ -334,6 +336,20 @@ export default function ImportCollectible({ onClose }: { onClose: () => void }) ) } + const handleRefreshCollectibleList = async () => { + if (contractType === CollectibleContractTypeValues.ERC721) { + const collectionData = await collectibleStore.resetERC721List(selectedNetwork.chainId) + setCollectionList(collectionData.tokens) + setCollectionListDate(new Date(collectionData.date)) + } else { + const collectionData = await collectibleStore.resetERC1155List(selectedNetwork.chainId) + setCollectionList(collectionData.tokens) + setCollectionListDate(new Date(collectionData.date)) + } + + setConfirmRefreshList(false) + } + return ( {selectedCollection ? ( @@ -445,7 +461,7 @@ export default function ImportCollectible({ onClose }: { onClose: () => void }) - + void }) onChange={handleFileChange} /> - {selectedNetwork && ( + {collectionListDate && (