proper handling of arg_types. add more options for listaddresses
This commit is contained in:
32
electrum
32
electrum
@@ -181,6 +181,8 @@ def run_cmdline(config):
|
||||
|
||||
# arguments passed to function
|
||||
args = map(lambda x: config.get(x), map(lambda x: x[0], cmd.params))
|
||||
# options
|
||||
args += map(lambda x: config.get(x), cmd.options)
|
||||
|
||||
# instanciate wallet for command-line
|
||||
storage = WalletStorage(config.get_wallet_path())
|
||||
@@ -297,36 +299,6 @@ def run_cmdline(config):
|
||||
# See if they specificed a key on the cmd line, if not prompt
|
||||
args.append(prompt_password('Enter PrivateKey (will not echo):', False))
|
||||
|
||||
elif cmd.name == 'createmultisig':
|
||||
args = [int(args[0]), json.loads(args[1])]
|
||||
|
||||
elif cmd.name == 'createrawtransaction':
|
||||
args = [json.loads(args[0]), json.loads(args[2])]
|
||||
|
||||
elif cmd.name == 'listaddresses':
|
||||
args = [config.get('show_all'), config.get('show_labels')]
|
||||
|
||||
elif cmd.name == 'make_seed':
|
||||
args = [int(config.get('nbits')), long(config.get('entropy')), config.get('language')]
|
||||
|
||||
elif cmd.name in ['payto', 'mktx']:
|
||||
domain = [config.get('from_addr')] if config.get('from_addr') else None
|
||||
args = [args[0], Decimal(args[1]), Decimal(config.get('tx_fee')) if config.get('tx_fee') else None, config.get('change_addr'), domain]
|
||||
|
||||
elif cmd.name in ['paytomany', 'mksendmanytx']:
|
||||
domain = [config.get('from_addr')] if config.get('from_addr') else None
|
||||
args = [args[0], Decimal(config.get('tx_fee')) if config.get('tx_fee') else None, config.get('change_addr'), domain]
|
||||
|
||||
elif cmd.name == 'help':
|
||||
if len(args) < 1:
|
||||
print_help(parser)
|
||||
sys.exit(1)
|
||||
|
||||
if cmd.name == 'check_seed':
|
||||
args.append(long(config.get('entropy')))
|
||||
args.append(config.get('language'))
|
||||
|
||||
|
||||
# run the command
|
||||
if cmd.name == 'deseed':
|
||||
if not wallet.seed:
|
||||
|
||||
Reference in New Issue
Block a user