fiat_e: set precision to 0.01
authorThomasV <thomasv@gitorious>
Wed, 11 Jun 2014 16:20:25 +0000 (18:20 +0200)
committerThomasV <thomasv@gitorious>
Wed, 11 Jun 2014 16:20:25 +0000 (18:20 +0200)
plugins/exchange_rate.py

index 5128e43..3ce4447 100644 (file)
@@ -658,6 +658,6 @@ class Plugin(BasePlugin):
                 return
             fiat_amount = self.exchanger.exchange(Decimal(btc_amount)/Decimal(100000000), self.fiat_unit())
             if fiat_amount is not None:
-                self.fiat_e.setText(str(fiat_amount))
+                self.fiat_e.setText("%.2f"%fiat_amount)
         self.btc_e.textEdited.connect(btc_changed)
         self.win.send_grid.addWidget(self.fiat_e, 4, 3, Qt.AlignHCenter)