Updates for exchange_rate plugin
Have AmountEdit return an int if is_int, otherwise a Decimal Set the tray tooltip unconditionally. More verbose logging for exchage_rate plugin. Get rate_float from Coindesk as rate can have commas. Plugin tracks windows itself, and doesn't create its own members in the window objects. Clean up the edit handling.
This commit is contained in:
@@ -63,10 +63,9 @@ class AmountEdit(MyLineEdit):
|
||||
|
||||
def get_amount(self):
|
||||
try:
|
||||
x = int(str(self.text()))
|
||||
return (int if self.is_int else Decimal)(str(self.text()))
|
||||
except:
|
||||
return None
|
||||
return x
|
||||
|
||||
|
||||
class BTCAmountEdit(AmountEdit):
|
||||
|
||||
Reference in New Issue
Block a user