Open neatonk opened 1 year ago
Thanks for so much detail on this! @dblodorn has been maintaining + moving this repo forward so will defer to him mostly, but have some thoughts about the public/presale options to provide -- which is that I agree with u completely that only showing presale when both are available to the given user (ex: if they are logged in, and they are on presale list, they only see that) makes total sense to me. Perhaps lets just provide an override in the component itself that would let a dev allow both if that was needed for some reason, without them having to fork the package
Hey @neatonk thanks so much for the insight and sharing the updates you made in your codebase. Yeah I had been thinking in terms of either or. So this is really helpful.
I have a big pr to merge into main and will implement your work along with some other features i've been thinking on.
One of which is a conditional rendering wrapper to displaying elements based on sale state. This use case surfaced in a project where messaging and some ui not related directly to sales functionality needed to change based on sale state.
Thank you ser. Will ping you on the pr when it's ready!
Background
Thanks so much for adding support for allowlist/presale features to this repo. We are relying on this feature in the mint UI of the songcamp CC0lab website.
I've copied the code to our repo and made changes needed to support overlapping presale/pub sale windows. Other changes have been made to support custom markup, but that's out-of-scope for this discussion.
The following issues were addressed:
MintButton
component does not support overlapping presale/public sale windows and will not appear in the event that both are active. This case is not covered by the boolean expressions which wrap the two button markup cases:totalPurchasePrice
always reflects thepublicSalePrice
and does not change to reflect the presale price. (That said, it seemed to work when I was testing with a different contract on goerli where the presale was active, but the public sale was not. Not sure if my memory is accurate on this point though)Proposal
Rather than making a proper PR for this I felt it better to discuss what would likely be a better solution.
In our case, the presale option is always preferable, so there is no need to show the public sale option when the connected wallet is on the allowlist.
cc/ @0xTranqui @dblodorn