Browse Source

kivy: simplify parse_URI

283
ThomasV 9 years ago
parent
commit
c57ed0c212
  1. 2
      gui/kivy/main_window.py
  2. 7
      gui/kivy/uix/screens.py

2
gui/kivy/main_window.py

@ -232,7 +232,7 @@ class ElectrumWindow(App):
try: try:
url = electrum.util.parse_URI(url, self.on_pr) url = electrum.util.parse_URI(url, self.on_pr)
except: except:
self.show_info("Invalid URI", url) self.show_info(_("Not a Bitcoin URI") + ':\n', url)
return return
self.send_screen.set_URI(url) self.send_screen.set_URI(url)

7
gui/kivy/uix/screens.py

@ -230,12 +230,7 @@ class SendScreen(CScreen):
if not contents: if not contents:
self.app.show_info(_("Clipboard is empty")) self.app.show_info(_("Clipboard is empty"))
return return
try: self.app.set_URI(contents)
uri = parse_URI(contents)
except:
self.app.show_info(_("Clipboard content is not a Bitcoin URI"))
return
self.set_URI(uri)
def do_send(self): def do_send(self):
if self.payment_request: if self.payment_request:

Loading…
Cancel
Save