Browse Source

kivy: fix amount edit

283
ThomasV 9 years ago
parent
commit
525e08af54
  1. 8
      gui/kivy/main_window.py

8
gui/kivy/main_window.py

@ -443,9 +443,13 @@ class ElectrumWindow(App):
def update_amount(self, amount, c):
if c == '<':
return amount[:-1]
if c == '.' and amount == '':
return '0.'
if c == '0' and amount == '0':
return '0'
try:
s = amount + c
amount = s if Decimal(s)!=0 else ''
Decimal(amount+c)
amount += c
except:
pass
return amount

Loading…
Cancel
Save