1
0

merge signtxwithwallet and signtxwithkey

This commit is contained in:
ThomasV
2015-05-31 09:28:47 +02:00
parent 1d5f04c588
commit cc610d352f
2 changed files with 14 additions and 17 deletions

View File

@@ -291,11 +291,6 @@ def run_cmdline(config):
else:
network = None
# See if they specificed a key on the cmd line, if not prompt
if (cmd.name == 'importprivkey' and len(args)==1)\
or (cmd.name == 'signtxwithkey' and len(args)==2):
args.append(prompt_password('Enter PrivateKey (will not echo):', False))
# run the command
if cmd.name == 'deseed':
if not wallet.seed:
@@ -390,6 +385,10 @@ if __name__ == '__main__':
if config_options.get('portable') and config_options.get('wallet_path') is None:
config_options['electrum_path'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'electrum_data')
# If private key is passed on the command line, '?' triggers prompt.
if config_options.get('privkey') and config_options['privkey'] == '?':
config_options['privkey'] = prompt_password('Enter PrivateKey (will not echo):', False)
set_verbosity(config_options.get('verbose'))
config = SimpleConfig(config_options)