mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-13 01:58:08 +00:00
16 lines
264 B
Python
16 lines
264 B
Python
MAINNET = 764824073
|
|
TESTNET = 1097911063
|
|
|
|
NAMES = {
|
|
MAINNET: "Mainnet",
|
|
TESTNET: "Testnet",
|
|
}
|
|
|
|
|
|
def is_mainnet(protocol_magic: int) -> bool:
|
|
return protocol_magic == MAINNET
|
|
|
|
|
|
def to_ui_string(value: int) -> str:
|
|
return NAMES.get(value, "Unknown")
|