use Decimal in listunspent
authorThomasV <thomasv@gitorious>
Fri, 1 Mar 2013 05:43:08 +0000 (06:43 +0100)
committerThomasV <thomasv@gitorious>
Fri, 1 Mar 2013 05:43:08 +0000 (06:43 +0100)
lib/commands.py

index c795fb3..be45f9d 100644 (file)
@@ -123,7 +123,7 @@ class Commands:
     def listunspent(self):
         import copy
         l = copy.deepcopy(self.wallet.get_unspent_coins())
-        for i in l: i["value"] = i["value"]*1e-8
+        for i in l: i["value"] = str(Decimal(i["value"])/100000000)
         return l
 
     def createrawtransaction(self, inputs, outputs):