diff --git a/app/models/bitcoin_address.rb b/app/models/bitcoin_address.rb index 920b591..9de81fd 100644 --- a/app/models/bitcoin_address.rb +++ b/app/models/bitcoin_address.rb @@ -10,7 +10,7 @@ def request_balance url end def update_balance - res = request_balance("http://hodl.amit.systems:1781/ext/getbalance/#{self.bitcoin_address}").tr('\\.', '') + res = request_balance("http://hodl.amit.systems:1781/ext/getbalance/#{self.bitcoin_address}").gsub('\\.', '') if res!=false if ( (new_balance=res.to_i) >= 0) and (new_balance != self.balance)