lib/sibit/blockchain.rb in sibit-0.13.0 vs lib/sibit/blockchain.rb in sibit-0.13.1
- old
+ new
@@ -50,10 +50,12 @@
def price(currency)
h = Sibit::Json.new(http: @http, log: @log).get(
URI('https://blockchain.info/ticker')
)[currency]
raise Error, "Unrecognized currency #{currency}" if h.nil?
- h['15m']
+ price = h['15m']
+ @log.info("The price of BTC is #{price} USD")
+ price
end
# Gets the balance of the address, in satoshi.
def balance(address)
json = Sibit::Json.new(http: @http, log: @log).get(