RubyMoney / eu_central_bank

A gem that calculates the exchange rate using published rates from European Central Bank. Compatible with the money gem
MIT License
217 stars 130 forks source link

ArgumentError: wrong number of arguments (given 3, expected 2) #116

Closed thibaut-pro closed 1 year ago

thibaut-pro commented 2 years ago

We are getting the following error when trying to call .exchange_to:

#<ArgumentError: wrong number of arguments (given 3, expected 2)>
/Users/thibaut/.rvm/gems/ruby-2.7.4/gems/money-6.9.0/lib/money/rates_store/memory.rb:56:in `get_rate'
/Users/thibaut/.rvm/gems/ruby-2.7.4/gems/eu_central_bank-1.1.3/lib/eu_central_bank.rb:91:in `get_rate'
/Users/thibaut/.rvm/gems/ruby-2.7.4/gems/eu_central_bank-1.1.3/lib/eu_central_bank.rb:59:in `exchange_with'
/Users/thibaut/.rvm/gems/ruby-2.7.4/gems/money-6.9.0/lib/money/money.rb:436:in `exchange_to'

It seems like the instantiated store is the money RatesStore instead of the eu_central_bank StoreWithHistoricalDataSupport.

How can we fix that?