diff --git a/components/collections/creation/BaseMinterDetails.tsx b/components/collections/creation/BaseMinterDetails.tsx index ad41461..54ad9e1 100644 --- a/components/collections/creation/BaseMinterDetails.tsx +++ b/components/collections/creation/BaseMinterDetails.tsx @@ -4,6 +4,9 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import { toUtf8 } from '@cosmjs/encoding' import axios from 'axios' +import clsx from 'clsx' +import { Alert } from 'components/Alert' +import { Conditional } from 'components/Conditional' import { useInputState } from 'components/forms/FormInput.hooks' import { useWallet } from 'contexts/wallet' import React, { useCallback, useEffect, useState } from 'react' @@ -73,7 +76,6 @@ export const BaseMinterDetails = ({ onChange, minterType }: BaseMinterDetailsPro } const filterBaseMinterContracts = async () => { - setMyBaseMinterContracts([]) await fetchMinterContracts() .then((minterContracts) => minterContracts.map(async (minterContract: any) => { @@ -107,18 +109,20 @@ export const BaseMinterDetails = ({ onChange, minterType }: BaseMinterDetailsPro }) }, [debouncedMyBaseMinterContracts]) - const debouncedWalletAddress = useDebounce(wallet.address, 500) + const debouncedWalletAddress = useDebounce(wallet.address, 300) const displayToast = async () => { await toast.promise(filterBaseMinterContracts(), { - loading: 'Fetching Base Minter contracts...', - success: 'Base Minter contracts retrieved.', - error: 'Unable to retrieve Base Minter contracts.', + loading: 'Retrieving previous 1/1 collections...', + success: 'Collection retrieval finalized.', + error: 'Unable to retrieve any 1/1 collections.', }) } useEffect(() => { if (debouncedWalletAddress && baseMinterAcquisitionMethod === 'existing') { + setMyBaseMinterContracts([]) + existingBaseMinterState.onChange('') void displayToast() } }, [debouncedWalletAddress, baseMinterAcquisitionMethod]) @@ -177,20 +181,35 @@ export const BaseMinterDetails = ({ onChange, minterType }: BaseMinterDetailsPro {baseMinterAcquisitionMethod === 'existing' && (