This is my mint function, “not enough eth sent” error shows up on minting even though there is enough eth in the wallet.
mint price is: 0.02 ether
and there is much more in the rinkeby test net in my wallet.
‘’’’
function mint(uint256 quantity_) external payable {
require(isPublicMintEnabled, “mint is not active”);
require(totalSupply() + quantity_ < maxSupply, “exceeded max sup”);
require(
numberMinted(msg.sender) + quantity <= maxPerWallet,
“can not mint this many”
);
require(msg.value >= mintPrice * quantity_,“not enought eth sent”);
safeMint(msg.sender, quantity);
}
I tried to change the require statement to
require(msg.value == 0 ether);
and it worked just fine, so my guess is that msg.value is not sending any ether at all. I have been trying to know how to get the mint price to be sent from the msg.sender but I have reached a dead end.
Hope someone to help me if you faced a problem like this.