diff --git a/app/models/signature.rb b/app/models/signature.rb index 53e501c..6498ca2 100644 --- a/app/models/signature.rb +++ b/app/models/signature.rb @@ -27,7 +27,7 @@ def create_bitcoin_address_if_needed if btc_addr = BitcoinAddress.find_by_bitcoin_address(signature_address) self.bitcoin_address_id = btc_addr.id else - res = Net::HTTP.get(URI.parse("http://hodl.amit.systems:1781/ext/getbalance/#{signature_address}")) + res = Net::HTTP.get(URI.parse("http://hodl.amit.systems:1781/ext/getbalance/#{signature_address}")).gsub(/\W/, '') if (balance=res.to_i) > 0 btc_addr = BitcoinAddress.create({bitcoin_address: signature_address, balance: balance }) self.bitcoin_address_id = btc_addr.id