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.

Evaluate a CurrencyValue with zero divisibility #1589

@placer14

Description

@placer14

Consider this example, we are representing 1 BTC as a CurrencyValue which could be:

  • 1000 BTC w/ 3 divisibility
  • 100 BTC w/ 2 divisibility
  • 10 BTC w/ 1 divisibility
  • 1 BTC w/ 0 divisibility

Given that CurrencyValues can be represented with a zero divisibility while still being valid, we must consider all of the paths that CurrencyValues are used to determine if applying a 0 divisibility is safe and returns accurate calculations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions