Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Refactor core.GetModeratorFee to use repo.Profile #1989

Open
2 tasks
placer14 opened this issue Feb 18, 2020 · 0 comments
Open
2 tasks

Refactor core.GetModeratorFee to use repo.Profile #1989

placer14 opened this issue Feb 18, 2020 · 0 comments
Labels
internal Under-the-hood issues refactoring

Comments

@placer14
Copy link
Member

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 the orderTotal (in the currency of the order) and converts the local moderator state into a feeTotal converted to match the same currency/divisibility of the orderTotal.

Note: This depends on *CurrencyConverter being delivered as part of #1949

@placer14 placer14 added refactoring internal Under-the-hood issues labels Feb 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
internal Under-the-hood issues refactoring
Projects
None yet
Development

No branches or pull requests

1 participant