Skip to content

Commit

Permalink
Update signature.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeTrade authored Apr 11, 2018
1 parent 09a5999 commit ff33ff5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/signature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff33ff5

Please sign in to comment.