mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
kivy: do not open invoices, requests dialogs if list is empty
This commit is contained in:
parent
ca07399937
commit
971a6979ee
2 changed files with 10 additions and 1 deletions
|
@ -837,12 +837,22 @@ class ElectrumWindow(App):
|
|||
|
||||
def invoices_dialog(self, screen):
|
||||
from .uix.dialogs.invoices import InvoicesDialog
|
||||
if len(self.wallet.invoices.sorted_list()) == 0:
|
||||
self.show_info(' '.join([
|
||||
_('No saved invoices.'),
|
||||
_('Signed invoices are saved automatically when you scan them.'),
|
||||
_('You may also save unsigned requests or contact addresses using the save button.')
|
||||
]))
|
||||
return
|
||||
popup = InvoicesDialog(self, screen, None)
|
||||
popup.update()
|
||||
popup.open()
|
||||
|
||||
def requests_dialog(self, screen):
|
||||
from .uix.dialogs.requests import RequestsDialog
|
||||
if len(self.wallet.get_sorted_requests(self.electrum_config)) == 0:
|
||||
self.show_info(_('No saved requests.'))
|
||||
return
|
||||
popup = RequestsDialog(self, screen, None)
|
||||
popup.update()
|
||||
popup.open()
|
||||
|
|
|
@ -217,7 +217,6 @@ class SendScreen(CScreen):
|
|||
pr = make_unsigned_request(req).SerializeToString()
|
||||
pr = PaymentRequest(pr)
|
||||
self.app.wallet.invoices.add(pr)
|
||||
self.app.update_tab('invoices')
|
||||
self.app.show_info(_("Invoice saved"))
|
||||
if pr.is_pr():
|
||||
self.screen.is_pr = True
|
||||
|
|
Loading…
Add table
Reference in a new issue