electrum

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

commit 9acc0e4ed07cb7ae7d3da0f0426dd2b8f8e3e85e
parent 2167b9e93d171c06cfad0e6d29ebc00b6f5dfb4f
Author: ThomasV <thomasv@gitorious>
Date:   Sun, 31 May 2015 08:06:20 +0200

minor formatting

Diffstat:
Melectrum | 9+++------
Mlib/commands.py | 6+++---
2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/electrum b/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 diff --git a/lib/commands.py b/lib/commands.py @@ -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: