generate metadata updates

This commit is contained in:
tim
2024-10-11 00:25:32 -04:00
parent 8cc68cbeb4
commit 849bc8bd09
2 changed files with 2 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ async def write_metadata( pools, mirror_pools ):
for token in tokens: for token in tokens:
token['x'] = {'mock':True} token['x'] = {'mock':True}
with open(filename, 'w') as f: with open(filename, 'w') as f:
generate_metadata(tokens, pool_dicts, file=f) generate_metadata(tokens, pool_dicts, file=f, include_unapproved=True)
log.info(f'wrote {filename}') log.info(f'wrote {filename}')

View File

@@ -160,7 +160,7 @@ def generate_metadata(tokens: Iterable[Union[Token, OldTokenDict]], pools: Itera
dump(file, '{"' + str(current_chain.get().id) + '":{"t":[') dump(file, '{"' + str(current_chain.get().id) + '":{"t":[')
approved_token_addrs = dump_tokens(file, tokens, include_unapproved) approved_token_addrs = dump_tokens(file, tokens, include_unapproved)
dump(file, '],"p":[') dump(file, '],"p":[')
dump_pools(file, pools, approved_token_addrs) dump_pools(file, pools, None if include_unapproved else approved_token_addrs)
dump(file, ']}}') dump(file, ']}}')