mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 01:48:17 +00:00
coins: wrap JSON errors in an ImportError
This commit is contained in:
parent
bd43363b1c
commit
928498c666
@ -31,7 +31,11 @@ def _insight_for_coin(coin):
|
||||
# exported variables
|
||||
__all__ = ['by_name', 'slip44', 'tx_api']
|
||||
|
||||
by_name = _load_coins_json()
|
||||
try:
|
||||
by_name = _load_coins_json()
|
||||
except Exception as e:
|
||||
raise ImportError("Failed to load coins.json. Check your installation.") from e
|
||||
|
||||
slip44 = {name: coin['bip44'] for name, coin in by_name.items()}
|
||||
tx_api = {name: _insight_for_coin(coin)
|
||||
for name, coin in by_name.items()
|
||||
|
Loading…
Reference in New Issue
Block a user