From 0cb3ea35e954b3aff82c3da9797f02520a038e64 Mon Sep 17 00:00:00 2001 From: FreeTrade Date: Thu, 12 Apr 2018 02:37:48 +0700 Subject: [PATCH] Update bitcoin_address.rb --- app/models/bitcoin_address.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/bitcoin_address.rb b/app/models/bitcoin_address.rb index 5747b7f..63ae605 100644 --- a/app/models/bitcoin_address.rb +++ b/app/models/bitcoin_address.rb @@ -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