node-btcpay
node-btcpay copied to clipboard
client.get_rates fails if store ID is not specified
Calling get_rates
without store ID should work, as it does in btcpay-python as well.
The problem is that node-btcpay literally passes undefined
as store ID parameter if none is given, instead of just omitting the parameter in the URL.
Therefore, client.get_rates(['BTC_USD'])
fails while it works to use client.signed_get_request('/rates', {currencyPairs: 'BTC_USD'})
instead.
I think in general signed_get_request
should omit undefined
values.
if you fix it, I can merge and probably push a package. Though I am in the process of deprecating this repo in favor of one using btcpay greenfield.