Skip to content

add Currency Constants and normalizeByCurrency method#349

Open
alissn wants to merge 3 commits into
shetabit:masterfrom
alissn:CurrencyConstants
Open

add Currency Constants and normalizeByCurrency method#349
alissn wants to merge 3 commits into
shetabit:masterfrom
alissn:CurrencyConstants

Conversation

@alissn
Copy link
Copy Markdown
Contributor

@alissn alissn commented May 12, 2026

Hi,

This PR adds Currency Constants and a new normalizeByCurrency() method to convert prices based on the driver's currency.

Changes

  1. Added Currency constants class with TOMAN, RIAL, and RATIO mapping
  2. Added normalizeByCurrency() method in Driver abstract class to convert prices using currency ratios
  3. Updated all drivers to use the new method

Benefits

  • Removes magic strings ('T', 'R') from the codebase
  • Centralizes currency logic
  • No breaking changes — existing configs using strings still work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant