Skip to content

[currency converter] allow to deduce reverse rate#1126

Merged
SyntaxNode merged 1 commit intoprebid:masterfrom
benjaminch:improve-currency-converter
Dec 3, 2019
Merged

[currency converter] allow to deduce reverse rate#1126
SyntaxNode merged 1 commit intoprebid:masterfrom
benjaminch:improve-currency-converter

Conversation

@benjaminch
Copy link
Contributor

This CL allows the currency rate currency to deduce a currency rate even
if not directly defined in the table but the reverse rate is present.

E.q.

USD => EUR is 1.0897
EUR => USD is not set

Old behavior when asking rate from EUR to USD will not be found,
New behavior is using the known reverse rate to deduce the rate.

Rate for 2 USD will be 2 * (1 / 1.0897)

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

Labels

None yet

3 participants