lib/mtgox/balance.rb in mtgox-0.9.1 vs lib/mtgox/balance.rb in mtgox-1.0.0
- old
+ new
@@ -1,10 +1,12 @@
+require 'bigdecimal'
+
module MtGox
class Balance
attr_accessor :currency, :amount
def initialize(currency=nil, amount=nil)
self.currency = currency.to_s.upcase
- self.amount = amount.to_f
+ self.amount = BigDecimal(amount.to_s)
end
end
end