Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable whitelisting before enabling pre / public sales #193

Merged
merged 3 commits into from
Jun 7, 2022

Conversation

basememara
Copy link
Contributor

If a presales or public sales is enabled while whitelisting is enabled, it leaves the dapp in an invalid state. On the left, I enabled public sales when whitelisting was enabled. The sales status shows whitelisting only and public sales price. On the right, it was corrected.

I'm open to discussion because it could be argued that this is a user error and they should know to disable whitelisting before pre/public sales. So this may be more of a convenience and guarding against user error.

Before After
Screen Shot 2022-03-31 at 11 12 59 AM Screen Shot 2022-03-31 at 11 14 47 AM

@liarco
Copy link
Member

liarco commented Apr 2, 2022

Hi @basememara, this can be useful but as you said the collection owner would have no clue both sales are open at the same time... I mean, not that users complaining about the issue can be considered a good feedback 😅 but at least it can let them know that people will still be able to mint at the whitelist price if they do that from Etherscan.

Anyway I think this is probably a fix that we should merge and then I can focus on something else to give owners some feedback about what's happening.

Thank you for this, I'm gonna review it asap.

@basememara
Copy link
Contributor Author

I think throwing an error instead of automatically making a change is better, especially since the whitelist-close script could involve a lot more than contract.whitelistMintEnabled() in the future.

Now running yarn public-sale-open while a whitelisting is open throws an error:

error Please close the whitelist sale before opening a public sale.

@liarco liarco merged commit 9902b1c into hashlips-lab:main Jun 7, 2022
@basememara basememara deleted the sales-disable-whitelist branch June 7, 2022 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants