move back URI rewriting to main electrum script
This commit is contained in:
parent
87cff8e380
commit
3cc7c1454b
15
electrum
15
electrum
|
@ -479,16 +479,19 @@ if __name__ == '__main__':
|
|||
|
||||
set_verbosity(config_options.get('verbose'))
|
||||
|
||||
config = SimpleConfig(config_options)
|
||||
cmd_name = config.get('cmd')
|
||||
|
||||
# check uri
|
||||
uri = config.get('url')
|
||||
uri = config_options.get('url')
|
||||
if uri:
|
||||
# Assume a file is a payment request
|
||||
if not os.path.exists(uri) and not re.match('^bitcoin:', uri):
|
||||
if os.path.exists(uri):
|
||||
# assume this is a payment request
|
||||
uri = "bitcoin:?r=file://"+ os.path.join(os.getcwd(), uri)
|
||||
if not re.match('^bitcoin:', uri):
|
||||
print_stderr('unknown command:', uri)
|
||||
sys.exit(1)
|
||||
config_options['url'] = uri
|
||||
|
||||
config = SimpleConfig(config_options)
|
||||
cmd_name = config.get('cmd')
|
||||
|
||||
# initialize plugins.
|
||||
plugins = None
|
||||
|
|
|
@ -229,9 +229,6 @@ class ElectrumGui:
|
|||
self.build_tray_menu()
|
||||
|
||||
if uri:
|
||||
if os.path.exists(uri):
|
||||
# assume this is a payment request
|
||||
uri = "bitcoin:?r=file://"+ os.path.join(os.getcwd(), uri)
|
||||
w.pay_to_URI(uri)
|
||||
|
||||
return w
|
||||
|
|
Loading…
Reference in New Issue