Handle missing exchange rate provider, allow fallback for missing rates (#955)

* Clean up exchange rate logic

* Remove stale method
This commit is contained in:
Zach Gollwitzer
2024-07-08 09:04:59 -04:00
committed by GitHub
parent bef335c631
commit 6767aaed1d
20 changed files with 383 additions and 609 deletions

View File

@@ -1,12 +1,8 @@
class Provider::Synth
include Retryable
def initialize(api_key = ENV["SYNTH_API_KEY"])
@api_key = api_key || ENV["SYNTH_API_KEY"]
end
def configured?
@api_key.present?
def initialize(api_key)
@api_key = api_key
end
def fetch_exchange_rate(from:, to:, date:)