Skip to content

Commit

Permalink
Update bitcoin_address.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeTrade authored Apr 11, 2018
1 parent 027bd90 commit 0cb3ea3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/bitcoin_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ class BitcoinAddress < ActiveRecord::Base
has_many :arguments, through: :signatures

def request_balance url
(Integer(Net::HTTP.get(URI.parse(url)).gsub('\\.', '')) rescue false)
logger.info("request_balance: #{url}")
response=Net::HTTP.get(URI.parse(url))
logger.info("response: #{response}")

(Integer(response.gsub('\\.', '')) rescue false)
end

def update_balance
Expand Down

0 comments on commit 0cb3ea3

Please sign in to comment.