-
Notifications
You must be signed in to change notification settings - Fork 4
Commerce: Add promos to service #130
Copy link
Copy link
Open
Description
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.
Reactions are currently unavailable