From 00cec183685ca1a6ccf27fb3bf9c284382f1a543 Mon Sep 17 00:00:00 2001 From: Fabien Date: Thu, 14 Nov 2024 11:17:03 +0100 Subject: [PATCH] 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. --- common/tools/coin_info.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/tools/coin_info.py b/common/tools/coin_info.py index 58b3dcc812..79581e2fb2 100755 --- a/common/tools/coin_info.py +++ b/common/tools/coin_info.py @@ -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),