UNPKG

@prism-hq/prism-ag

Version:

Prism Aggregator

22 lines (21 loc) 770 B
"use strict"; // import { Connection } from "@solana/web3.js"; // import { getPoolList } from '@lifinity/sdk'; // export function getLifinityPools() { // try { // const lifinityPools = getPoolList(); // let pools: any = {}; // for (const [_, lifinityPool] of Object.entries(lifinityPools)) { // let pool = {...lifinityPool, provider: "lifinity"} // let coinMint = pool.poolCoinMint; // let pcMint = pool.poolPcMint; // (pools[coinMint] || (pools[coinMint] = [])).push({...pool, other:pcMint}); // (pools[pcMint] || (pools[pcMint] = [])).push({...pool, other:coinMint}); // } // console.log(pools); // return pools; // } catch(e) { // console.log(e); // return {}; // } // }