Summary
In src/lib/lifi.ts:
export async function getAllChains() {
ensureConfig(); // not awaited
const chains = await getChains({ chainTypes: [ChainType.EVM] });
console.log(chains); // dumps the entire chain list to stdout
}
ensureConfig() is called without await, so getChains() may run before LI.FI config (and the chain set) is initialized. It also logs the full chain array to the server console and is not referenced anywhere in the codebase (dead code).
Impact
- Potential race condition if it is ever used.
- Unwanted noise in server logs.
- Dead export adds confusion about the intended helper API.
Suggested fix
await ensureConfig();
- Remove the
console.log(chains);
- Either wire it up properly or remove the function entirely.
Summary
In
src/lib/lifi.ts:ensureConfig()is called withoutawait, sogetChains()may run before LI.FI config (and the chain set) is initialized. It also logs the full chain array to the server console and is not referenced anywhere in the codebase (dead code).Impact
Suggested fix
await ensureConfig();console.log(chains);