This repository was archived by the owner on Mar 28, 2023. It is now read-only.
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
Refactor core.GetModeratorFee to use repo.Profile #1989
Open
Description
core.GetModeratorFee
accesses internal profile state which is already nicely exposed via repo.Profile.GetFixedFee
.
- It would be good to refactor this to use existing
repo.Profile.GetFixedFee
- Bonus: Expose a new function which provides
(repo.Profile).GetModeratorFee(orderTotal *CurrencyValue, cc *CurrencyConverter) (feeTotal *CurrencyValue, error)
which takes in theorderTotal
(in the currency of the order) and converts the local moderator state into afeeTotal
converted to match the same currency/divisibility of theorderTotal
.
Note: This depends on *CurrencyConverter
being delivered as part of #1949