mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-28 18:38:39 +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:
parent
fc6ec565a1
commit
00cec18368
@ -232,7 +232,10 @@ def check_key(
|
|||||||
BTC_CHECKS = [
|
BTC_CHECKS = [
|
||||||
check_key("coin_name", str, regex=r"^[A-Z]"),
|
check_key("coin_name", str, regex=r"^[A-Z]"),
|
||||||
check_key("coin_shortcut", str, regex=r"^t?[A-Z]{3,}$"),
|
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("website", str, regex=r"^https://.*[^/]$"),
|
||||||
check_key("github", str, regex=r"^https://git(hu|la)b.com/.*[^/]$"),
|
check_key("github", str, regex=r"^https://git(hu|la)b.com/.*[^/]$"),
|
||||||
check_key("maintainer", str),
|
check_key("maintainer", str),
|
||||||
|
Loading…
Reference in New Issue
Block a user