electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 3cc7c1454bb599c9d13863c553a533cd37e3224f
parent 87cff8e380003b1dfe2af1c8ed31d35a13bb1d05
Author: ThomasV <thomasv@electrum.org>
Date:   Thu,  3 Sep 2015 11:18:35 +0200

move back URI rewriting to main electrum script

Diffstat:
Melectrum | 15+++++++++------
Mgui/qt/__init__.py | 3---
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/electrum b/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 diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py @@ -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