Skip to content

Commit

Permalink
Change filter pool ID method
Browse files Browse the repository at this point in the history
  • Loading branch information
buchaoqun committed Nov 29, 2023
1 parent 02beb05 commit b561482
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/adaptors/solv-funds/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
const { default: request, gql } = require('graphql-request');
const axios = require('axios');

const poolIds = [
"0xe037ef7b5f74bf3c988d8ae8ab06ad34643749ba9d217092297241420d600fce",
"0xc573ea3cb55168e5ebe04b118c4b8a33ba62e86bbe1d1e735a447467795c3bd4",
"0xf514bf1cefa177ea26156b1d0d0da28da8f88b5eb8ed673ddd2cea5334bb6d6c",
"0x9119ceb6bcf974578e868ab65ae20c0d546716a6657eb27dc3a6bf113f0b519c",
"0xf514bf1cefa177ea26156b1d0d0da28da8f88b5eb8ed673ddd2cea5334bb6d6c",
"0x3f9c68bbb64152799c006c8c505d60edf930f7a45db3b63534ed4c2dae07f7a8",
"0x504d291d2f4dedf8fa3ac3a342ff3531b8947fa835077c8312fa18da2be4084c",
"0x370c1ec55ca4a79b54909892f55573603611e0cf34f89a40405e81b8d6a78195"
]

const chain = {
1: 'ethereum',
56: 'bsc',
Expand All @@ -33,7 +22,9 @@ const poolsQuery = gql`
query Pools {
pools(filter:{
poolStatus: "Active",
auditStatus: "Approved"
auditStatus: "Approved",
isUnlisted: false,
saleStatus: ["Upcoming","Fundraising","Active"]
}){
poolsInfo {
id
Expand Down Expand Up @@ -74,9 +65,13 @@ const poolsFunction = async () => {
await axios.get(`https://coins.llama.fi/prices/current/${pricesArray}`)
).data.coins;

const filterOutPoolId = (
await axios.get(`https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/main/pools.json`)
).data.filterOut;

let ustPool = [];
for (const pool of pools.poolsInfo) {
if (poolIds.indexOf(pool.poolOrderInfo.poolId) == -1) {
if (filterOutPoolId.indexOf(pool.poolOrderInfo.poolId) !== -1) {
continue
}

Expand Down

0 comments on commit b561482

Please sign in to comment.