lib/adapters/crypto/bitfinex_adapter.rb in currency-rate-1.7.0 vs lib/adapters/crypto/bitfinex_adapter.rb in currency-rate-2.0.0
- old
+ new
@@ -19,10 +19,10 @@
ANCHOR_CURRENCY = "BTC"
FETCH_URL = "https://api.bitfinex.com/v2/tickers?symbols=ALL"
def normalize(data)
- return nil unless super
+ return nil unless data = super
data.reduce({ "anchor" => ANCHOR_CURRENCY }) do |result, pair_info|
pair_name = pair_info[0].sub("t", "")
key = pair_name.sub(ANCHOR_CURRENCY, "")
key = ASSET_MAP[key] || key