rusty_money
rusty_money copied to clipboard
Account for inverse rate
This is a PR to address #51. Feel free to close.
First off, thanks for submitting this, appreciate the PR!
Meta thoughts on this:
- What is the primary benefit of doing the ExchangeRateQuery over just building the logic into the Exchange in your opinion? I'm trying to justify the added complexity of another class here.
- On further reflection, forcing the inverse rate to always be set isn't desirable for all cases (e.g. currency spreads). I think this should be an optional flag on set_rate.
- Since this is a big API change, ill hold this back till the 0.5.0 release if we do decide to go forward with it.
You're welcome! Thanks for publishing this library, it's great! With regard to those meta thoughts:
- I think I covered this in a reply to one of your line comments
- Also in a line comment reply
- That's totally fine!
@varunsrin Are you still interesting in having this PR merged in? If not, I can close it.