Skip to content

Replace double with deterministic money representation #44

Description

@v1dit

Summary

CodeRabbit identified potential precision issues caused by using double for monetary values in financial calculations.

Problem

Financial values should use a deterministic representation to avoid floating-point rounding errors.

Affected areas:

  • Split.amount
  • Expense.amount
  • Settlement.amount
  • calculation_utils.dart
  • settlement.dart
  • validation_utils.dart

Proposed Solution

  • Replace money values with integer cents representation
  • Update validation logic
  • Update settlement calculations
  • Update unit tests

Reference

Related to PR #40

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions