Open JavedNissar opened 3 years ago
yes, the exchange rate crate isn't very mature right now, thanks for pointing out these issues.
i noticed some PR's, will review them over the weekend.
i will probably drop a new release (4.0.1) on Monday with any changes that are ready.
That sounds good, no rush 😄 . I actually probably should add some tests anyways.
We found that the rate for USD -> GBP
is not the same as the rate for GBP -> USD
in the real world exchanges (example: currencylayer.com).
If the crate wants to align with the currency exchanges in the market, it should return None
as in the majority of cases you will want to store two different rates.
If you store a rate for
USD -> GBP
and then you query for the rate forGBP -> USD
, you get aNone
value. This doesn't seem correct to me. Shouldn't the value returned be 1/(rate returned forUSD -> GBP
)?