merge signtxwithwallet and signtxwithkey
This commit is contained in:
9
electrum
9
electrum
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user