minor formatting
This commit is contained in:
parent
2167b9e93d
commit
9acc0e4ed0
9
electrum
9
electrum
|
@ -245,10 +245,8 @@ def run_cmdline(config):
|
|||
print_msg("Type 'electrum create' to create a new wallet, or provide a path to a wallet with the -w option")
|
||||
sys.exit(0)
|
||||
|
||||
if cmd.requires_wallet:
|
||||
wallet = Wallet(storage)
|
||||
else:
|
||||
wallet = None
|
||||
# create wallet instance
|
||||
wallet = Wallet(storage) if cmd.requires_wallet else None
|
||||
|
||||
# important warning
|
||||
if cmd.name in ['dumpprivkey', 'dumpprivkeys']:
|
||||
|
@ -293,10 +291,9 @@ def run_cmdline(config):
|
|||
else:
|
||||
network = None
|
||||
|
||||
# add missing arguments, do type conversions
|
||||
# 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):
|
||||
# See if they specificed a key on the cmd line, if not prompt
|
||||
args.append(prompt_password('Enter PrivateKey (will not echo):', False))
|
||||
|
||||
# run the command
|
||||
|
|
|
@ -250,7 +250,7 @@ class Commands:
|
|||
return result
|
||||
|
||||
def help(self):
|
||||
return sorted(known_commands.keys())
|
||||
return 'Commands: ' + ', '.join(sorted(known_commands.keys()))
|
||||
|
||||
def make_seed(self, nbits, custom_entropy, language):
|
||||
from mnemonic import Mnemonic
|
||||
|
@ -275,7 +275,7 @@ class Commands:
|
|||
def getutxoaddress(self, txid, num):
|
||||
r = self.network.synchronous_get([ ('blockchain.utxo.get_address',[txid, num]) ])
|
||||
if r:
|
||||
return {'address':r[0] }
|
||||
return {'address':r[0]}
|
||||
|
||||
def createrawtransaction(self, inputs, outputs):
|
||||
coins = self.wallet.get_spendable_coins(exclude_frozen = False)
|
||||
|
@ -537,7 +537,7 @@ class Commands:
|
|||
tx = self.wallet.transactions.get(tx_hash)
|
||||
if tx:
|
||||
return tx
|
||||
raw = self.network.synchronous_get([('blockchain.transaction.get',[tx_hash])])[0]
|
||||
raw = self.network.synchronous_get([('blockchain.transaction.get', [tx_hash])])[0]
|
||||
if raw:
|
||||
return Transaction(raw)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue