1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-24 16:38:15 +00:00

feat(common): Add an exception for eCash to the coin_label regex

The regex enforces starting with an uppercase letter, which doesn't work for eCash and for xRhodium. An exception is added to handle this naming, as well as a comment to remind why the regex contains this special case.
This fixes `make defs_check` for eCash.
This commit is contained in:
Fabien 2024-11-14 11:17:03 +01:00
parent fc6ec565a1
commit 00cec18368

View File

@ -232,7 +232,10 @@ def check_key(
BTC_CHECKS = [
check_key("coin_name", str, regex=r"^[A-Z]"),
check_key("coin_shortcut", str, regex=r"^t?[A-Z]{3,}$"),
check_key("coin_label", str, regex=r"^x?[A-Z]"),
# coin_label expects an uppercase first letter. This doesn't
# work for eCash and xRhodium, so an exception is added for the lowercase
# 'e' and 'x' only.
check_key("coin_label", str, regex=r"^[ex]?[A-Z]"),
check_key("website", str, regex=r"^https://.*[^/]$"),
check_key("github", str, regex=r"^https://git(hu|la)b.com/.*[^/]$"),
check_key("maintainer", str),