more fix
This commit is contained in:
parent
93529317cd
commit
71e4681d60
@ -797,8 +797,10 @@ async def list_initial_wallet_states():
|
||||
await save_token_info()
|
||||
|
||||
def safe_get_property(info, property_name, default='Unknown'):
|
||||
return info.get(property_name, default) if isinstance(info, dict) else default
|
||||
|
||||
if not isinstance(info, dict):
|
||||
return str(default)
|
||||
value = info.get(property_name, default)
|
||||
return str(value) if value is not None else str(default)
|
||||
|
||||
async def save_token_info():
|
||||
with open('./logs/token_info.json', 'w') as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user