Skip to content

Commit a3acb20

Browse files
authored
feat: make logo optional (#954)
1 parent 7dbbc9c commit a3acb20

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

scripts/validate.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ def check_schema(test_data):
3434
with open(example_file, "r") as f:
3535
example = json.load(f)
3636

37+
optional_fields = {"logo"}
3738
ok = True
3839
for key, example_value in example.items():
3940
if key not in test_data:
41+
if key in optional_fields:
42+
continue
4043
print(f"❌ Missing field: '{key}'")
4144
ok = False
4245
continue
@@ -126,13 +129,14 @@ def main():
126129
else:
127130
print(f"✅ Name is valid: '{name_value.strip()}'")
128131

129-
# --- Check: 'logo' must point to a valid image URL ---
132+
# --- Check: 'logo' must point to a valid image URL (optional) ---
130133
logo = data.get("logo")
131-
if check_logo(logo):
132-
print("✅ Logo is valid")
133-
else:
134-
print(f"❌ Logo {logo} check failed")
135-
sys.exit(1)
134+
if logo is not None:
135+
if check_logo(logo):
136+
print("✅ Logo is valid")
137+
else:
138+
print(f"❌ Logo {logo} check failed")
139+
sys.exit(1)
136140

137141
# --- Check: on-chain keys must match payload keys
138142
secp_chain, bls_chain = get_validator_keys(validator_id, network)

testnet/024028e1910c32cac434c75d34e6957f059d5642b07de92735efb92b7e73f6aabf.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
"bls": "90b6b15a708aa6258622911b6cb4467918888f9943cb8141143a41094097578014318678fe56b0d2744fab6d617c93c8",
66
"website": "https://t.me/Anril44",
77
"description": "blockchain developer",
8-
"logo": "https://raw.githubusercontent.com/anril44/assets/main/logos/anril-1.jpg",
98
"x": "https://x.com/AnRil44"
109
}

0 commit comments

Comments
 (0)