-
Notifications
You must be signed in to change notification settings - Fork 1
/
subjects.py
67 lines (60 loc) · 1.46 KB
/
subjects.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
subjects_dict = {
'airdrop': None,
'bridges': {
'ETH': {
'TON -> ETH': None,
'ETH -> TON': None,
},
'BSC': {
'TON -> BSC': None,
'BSC -> TON': None,
}
},
'exchanges': {
'EXMO': None,
'FTX': None,
'OKX': None,
},
'TON DNS': None,
'validation': {
'mytonctrl': None,
'nominators': None
},
'wallets': {
'standard wallets': {
'android': None,
'ios': None,
'windows': None,
'macos': None,
'linux': None,
},
'web wallet': {
'wallet.ton.org': None,
'chrome extension': None
},
'Tonkeeper': {
'android': None,
'ios': None
},
},
}
################################################################
# check
def check_subjects_dict(gaga, l=None):
if l is None:
l = []
if isinstance(gaga, dict):
for key in gaga:
if len(key) > 32:
raise Exception(f'Check fail. Key length > 32: "{key}"')
check_subjects_dict(gaga[key], l + [key])
elif gaga is None:
# print('/'.join(l))
pass
else:
raise Exception(f'Check fail. "{"/".join(l)}" {gaga.__class__}')
check_subjects_dict(subjects_dict)
if __name__ == '__main__':
gag = 'wallets/standard wallets'
gag = get_subjects_list(gag)
print(gag)