kivy: use exchange rates in amount dialog
This commit is contained in:
@@ -258,9 +258,6 @@ class ReceiveScreen(CScreen):
|
||||
self.update_qr()
|
||||
|
||||
@profiler
|
||||
def update_qrtt(self):
|
||||
raise
|
||||
|
||||
def update_qr(self):
|
||||
from electrum.util import create_URI
|
||||
address = self.screen.ids.get('address').text
|
||||
|
||||
@@ -17,8 +17,11 @@ Popup:
|
||||
Label:
|
||||
id: a
|
||||
amount: ''
|
||||
fiat_amount: ''
|
||||
is_fiat: False
|
||||
text: app.get_amount_text(self.amount, self.is_fiat)
|
||||
btc_text: app.fiat_to_btc(self.fiat_amount) if self.is_fiat else (self.amount + ' ' + app.base_unit if self.amount else '')
|
||||
fiat_text: (self.fiat_amount + ' ' + app.fiat_unit if self.fiat_amount else '') if self.is_fiat else app.btc_to_fiat(self.amount)
|
||||
text: (self.fiat_text + ' / ' + self.btc_text if self.is_fiat else self.btc_text + ' / ' + self.fiat_text) if self.btc_text else ''
|
||||
size_hint: 1, 1
|
||||
|
||||
Widget:
|
||||
@@ -75,12 +78,15 @@ Popup:
|
||||
size_hint: 1, None
|
||||
height: '48dp'
|
||||
text: '/'
|
||||
on_release: a.is_fiat = not a.is_fiat
|
||||
on_release:
|
||||
app.toggle_fiat(a)
|
||||
Button:
|
||||
size_hint: 1, None
|
||||
height: '48dp'
|
||||
text: 'Clear'
|
||||
on_release: a.amount = ''
|
||||
on_release:
|
||||
a.amount = ''
|
||||
a.fiat_amount = ''
|
||||
|
||||
Widget:
|
||||
size_hint: 1, None
|
||||
|
||||
Reference in New Issue
Block a user