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

Commerce: Add promos to service #130

Open
erikrakuscek opened this issue Mar 29, 2024 · 0 comments
Open

Commerce: Add promos to service #130

erikrakuscek opened this issue Mar 29, 2024 · 0 comments
Assignees
Labels
launch refactor / internal an internal improvement
Milestone

Comments

@erikrakuscek
Copy link
Contributor

erikrakuscek commented Mar 29, 2024

Right now the logic to check promo codes is in packages/commerce/util/promo-codes.ts as a util. This logic should be part of the commerce service.

Add optional argument promos (array) to service impl, getSingleton and ContextProvider. For convenience, this can be passed in from @luxdefi/common/promos or something like that.

When we have the API to check promos we can make async getPromoFromCode and call the API from this function, for now it should just use the JSON object with promos to check if code belongs to a valid promo.

@erikrakuscek erikrakuscek self-assigned this Mar 29, 2024
@zeekay zeekay added this to the Launch milestone Apr 2, 2024
@zeekay zeekay added the enhancement Improvement to a an existing feature label Apr 2, 2024
@artemis-prime artemis-prime added refactor / internal an internal improvement launch and removed enhancement Improvement to a an existing feature labels Apr 2, 2024
@zeekay zeekay assigned zeekay and unassigned erikrakuscek May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launch refactor / internal an internal improvement
Projects
Status: No status
Development

No branches or pull requests

3 participants