Skip to content
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
@placer14

Description

@placer14

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions