eu_central_bank icon indicating copy to clipboard operation
eu_central_bank copied to clipboard

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

Open thibaut-pro opened this issue 4 years ago • 0 comments

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?

thibaut-pro avatar Nov 30 '21 03:11 thibaut-pro