diff --git a/scripts/validate.py b/scripts/validate.py index f6e023a9..fcf700b2 100755 --- a/scripts/validate.py +++ b/scripts/validate.py @@ -34,9 +34,12 @@ def check_schema(test_data): with open(example_file, "r") as f: example = json.load(f) + optional_fields = {"logo"} ok = True for key, example_value in example.items(): if key not in test_data: + if key in optional_fields: + continue print(f"❌ Missing field: '{key}'") ok = False continue @@ -126,13 +129,14 @@ def main(): else: print(f"✅ Name is valid: '{name_value.strip()}'") - # --- Check: 'logo' must point to a valid image URL --- + # --- Check: 'logo' must point to a valid image URL (optional) --- logo = data.get("logo") - if check_logo(logo): - print("✅ Logo is valid") - else: - print(f"❌ Logo {logo} check failed") - sys.exit(1) + if logo is not None: + if check_logo(logo): + print("✅ Logo is valid") + else: + print(f"❌ Logo {logo} check failed") + sys.exit(1) # --- Check: on-chain keys must match payload keys secp_chain, bls_chain = get_validator_keys(validator_id, network) diff --git a/testnet/024028e1910c32cac434c75d34e6957f059d5642b07de92735efb92b7e73f6aabf.json b/testnet/024028e1910c32cac434c75d34e6957f059d5642b07de92735efb92b7e73f6aabf.json index bf54e1ce..9d0d273c 100644 --- a/testnet/024028e1910c32cac434c75d34e6957f059d5642b07de92735efb92b7e73f6aabf.json +++ b/testnet/024028e1910c32cac434c75d34e6957f059d5642b07de92735efb92b7e73f6aabf.json @@ -5,6 +5,5 @@ "bls": "90b6b15a708aa6258622911b6cb4467918888f9943cb8141143a41094097578014318678fe56b0d2744fab6d617c93c8", "website": "https://t.me/Anril44", "description": "blockchain developer", - "logo": "https://raw.githubusercontent.com/anril44/assets/main/logos/anril-1.jpg", "x": "https://x.com/AnRil44" }