You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: