Skip to content

Commit

Permalink
[#hotfix] handle null value for BTSE
Browse files Browse the repository at this point in the history
  • Loading branch information
tmlee committed Jun 3, 2020
1 parent 78d03f7 commit 9e744c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cryptoexchange/exchanges/btse/services/market.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ def ticker_url

def adapt_all(output)
output.map do |pair, ticker|
next unless (ticker["last"] && ticker["lowest_ask"] && ticker["highest_bid"] && ticker["percent_change"] && ticker["volume"])
base, target = pair.split('-')
market_pair = Cryptoexchange::Models::MarketPair.new({
base: base,
target: target,
market: Btse::Market::NAME
})
adapt(ticker, market_pair)
end
end.compact
end

def adapt(output, market_pair)
Expand Down

0 comments on commit 9e744c3

Please sign in to comment.