diff --git a/src/mint/web3.js b/src/mint/web3.js index a469458..6f99166 100644 --- a/src/mint/web3.js +++ b/src/mint/web3.js @@ -67,7 +67,7 @@ const getMintPrice = async () => { return defaultMintPrice default: console.log("Using hardcoded price detection") - const methodNameVariants = ['price', 'cost', 'public_sale_price', 'getPrice'] + const methodNameVariants = ['price', 'cost', 'public_sale_price', 'getPrice','MINT_PRICE'] const name = methodNameVariants.find(n => findMethodByName(n) !== undefined) if (!name) { const defaultMintPrice = getDefaultMintPrice() @@ -100,10 +100,10 @@ export const getMintedNumber = async () => { export const getMaxSupply = async () => { if (!NFTContract) return undefined - if (NFTContract.methods.maxSupply) - return await NFTContract.methods.maxSupply().call() - if (NFTContract.methods.MAX_SUPPLY) - return await NFTContract.methods.MAX_SUPPLY().call() + if (NFTContract.methods.COLLECTION_SIZE) + return await NFTContract.methods.COLLECTION_SIZE().call() + if (NFTContract.methods.COLLECTION_SIZE) + return await NFTContract.methods.COLLECTION_SIZE().call() alert("Widget doesn't know how to fetch maxSupply from your contract. Contact https://buildship.xyz to resolve this.") return undefined }