You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/src/apps/cardano/helpers/network_ids.py

13 lines
329 B

MAINNET = 1
TESTNET = 0
def is_mainnet(network_id: int) -> bool:
"""
In the future there might be 15 mainnet IDs and
still only one testnet ID. Therefore it is safer
to check that it is not a testnet id. Also, if
the mainnet id was to change, this would still work.
"""
return network_id != TESTNET