qt: show send tab if payment identifier is passed on the cmdline
This commit is contained in:
@@ -393,6 +393,7 @@ class ElectrumGui(BaseElectrumGui, Logger):
|
|||||||
window.setWindowState(window.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
|
window.setWindowState(window.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
|
||||||
window.activateWindow()
|
window.activateWindow()
|
||||||
if uri:
|
if uri:
|
||||||
|
window.show_send_tab()
|
||||||
window.send_tab.set_payment_identifier(uri)
|
window.send_tab.set_payment_identifier(uri)
|
||||||
return window
|
return window
|
||||||
|
|
||||||
|
|||||||
12
run_electrum
12
run_electrum
@@ -365,12 +365,6 @@ def main():
|
|||||||
if not config_options.get('verbosity'):
|
if not config_options.get('verbosity'):
|
||||||
warnings.simplefilter('ignore', DeprecationWarning)
|
warnings.simplefilter('ignore', DeprecationWarning)
|
||||||
|
|
||||||
# check if we received a valid payment identifier
|
|
||||||
uri = config_options.get('url')
|
|
||||||
if uri and not PaymentIdentifier(None, uri).is_valid():
|
|
||||||
print_stderr('unknown command:', uri)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
config = SimpleConfig(config_options)
|
config = SimpleConfig(config_options)
|
||||||
cmdname = config.get('cmd')
|
cmdname = config.get('cmd')
|
||||||
|
|
||||||
@@ -398,6 +392,12 @@ def main():
|
|||||||
elif config.get('signet'):
|
elif config.get('signet'):
|
||||||
constants.set_signet()
|
constants.set_signet()
|
||||||
|
|
||||||
|
# check if we received a valid payment identifier
|
||||||
|
uri = config_options.get('url')
|
||||||
|
if uri and not PaymentIdentifier(None, uri).is_valid():
|
||||||
|
print_stderr('unknown command:', uri)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if cmdname == 'daemon' and config.get("detach"):
|
if cmdname == 'daemon' and config.get("detach"):
|
||||||
# detect lockfile.
|
# detect lockfile.
|
||||||
# This is not as good as get_file_descriptor, but that would require the asyncio loop
|
# This is not as good as get_file_descriptor, but that would require the asyncio loop
|
||||||
|
|||||||
Reference in New Issue
Block a user