1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-07 15:18:08 +00:00
trezor-firmware/core/src/apps/cardano/helpers/network_ids.py
2020-07-27 13:11:23 +02:00

13 lines
329 B
Python

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