mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
Better handling of user input for --coin in sign_tx
This commit is contained in:
parent
8c00cda95a
commit
ab3d17b3df
@ -447,10 +447,13 @@ def get_public_node(connect, coin, address, curve, show_display):
|
|||||||
@click.pass_obj
|
@click.pass_obj
|
||||||
def sign_tx(connect, coin):
|
def sign_tx(connect, coin):
|
||||||
client = connect()
|
client = connect()
|
||||||
try:
|
if coin in coins_txapi:
|
||||||
txapi = coins_txapi[coin]
|
txapi = coins_txapi[coin]
|
||||||
except:
|
else:
|
||||||
raise ValueError('Coin "%s" is not supported' % coin)
|
sys.stderr.write('Coin "%s" is not recognized.\n' % coin)
|
||||||
|
sys.stderr.write('Supported coin types: %s\n' % ", ".join(coins_txapi.keys()))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
client.set_tx_api(txapi)
|
client.set_tx_api(txapi)
|
||||||
|
|
||||||
if sys.version_info.major < 3:
|
if sys.version_info.major < 3:
|
||||||
|
Loading…
Reference in New Issue
Block a user