|
|
@ -17,7 +17,7 @@ if TYPE_CHECKING: |
|
|
|
Builder.load_string(''' |
|
|
|
<RequestDialog@Popup> |
|
|
|
id: popup |
|
|
|
amount: 0 |
|
|
|
amount_str: '' |
|
|
|
title: '' |
|
|
|
description:'' |
|
|
|
is_lightning: False |
|
|
@ -44,7 +44,7 @@ Builder.load_string(''' |
|
|
|
TopLabel: |
|
|
|
text: _('Description') + ': ' + root.description or _('None') |
|
|
|
TopLabel: |
|
|
|
text: _('Amount') + ': ' + app.format_amount_and_units(root.amount_sat) |
|
|
|
text: _('Amount') + ': ' + root.amount_str |
|
|
|
TopLabel: |
|
|
|
text: (_('Address') if not root.is_lightning else _('Payment hash')) + ': ' |
|
|
|
RefLabel: |
|
|
@ -93,7 +93,8 @@ class RequestDialog(Factory.Popup): |
|
|
|
r = self.app.wallet.get_request(key) |
|
|
|
self.is_lightning = r.is_lightning() |
|
|
|
self.data = r.invoice if self.is_lightning else self.app.wallet.get_request_URI(r) |
|
|
|
self.amount_sat = r.get_amount_sat() or 0 |
|
|
|
self.amount_sat = r.get_amount_sat() |
|
|
|
self.amount_str = self.app.format_amount_and_units(self.amount_sat) |
|
|
|
self.description = r.message |
|
|
|
self.update_status() |
|
|
|
|
|
|
|