From 677d7b5f04830f03f4dc2efa221988cff25bd9f2 Mon Sep 17 00:00:00 2001 From: FreeTrade Date: Thu, 12 Apr 2018 02:42:38 +0700 Subject: [PATCH] Update bitcoin_address.rb --- app/models/bitcoin_address.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/bitcoin_address.rb b/app/models/bitcoin_address.rb index 63ae605..bdb3c3e 100644 --- a/app/models/bitcoin_address.rb +++ b/app/models/bitcoin_address.rb @@ -9,8 +9,10 @@ def request_balance url logger.info("request_balance: #{url}") response=Net::HTTP.get(URI.parse(url)) logger.info("response: #{response}") + rem=response.gsub('\\.', '') + logger.info("removed: #{rem}") - (Integer(response.gsub('\\.', '')) rescue false) + (Integer(rem) rescue false) end def update_balance