Skip to content

Commit

Permalink
fix: chain header bug
Browse files Browse the repository at this point in the history
  • Loading branch information
swizzmagik committed Dec 31, 2024
1 parent 0caf8d3 commit cfbcd27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 5 additions & 4 deletions packages/plugin-birdeye/src/actions/get-token-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export const getTokenInfoAction = {
sort_by: "volume_24h_usd",
sort_type: "desc",
chain: "all",
limit: 15,
})
);

Expand Down Expand Up @@ -173,7 +174,7 @@ export const getTokenInfoAction = {
},
{
headers: {
chain,
"x-chain": chain,
},
}
),
Expand All @@ -183,7 +184,7 @@ export const getTokenInfoAction = {
},
{
headers: {
chain,
"x-chain": chain,
},
}
),
Expand All @@ -193,7 +194,7 @@ export const getTokenInfoAction = {
},
{
headers: {
chain,
"x-chain": chain,
},
}
),
Expand All @@ -203,7 +204,7 @@ export const getTokenInfoAction = {
},
{
headers: {
chain,
"x-chain": chain,
},
}
),
Expand Down
6 changes: 5 additions & 1 deletion packages/plugin-birdeye/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ export const getTokenResultFromSearchResponse = (
.flat()
.find(
(r: TokenResult): r is TokenResult =>
r.symbol.toLowerCase() === symbol.toLowerCase()
r.symbol.toLowerCase() === symbol.toLowerCase() &&
// only show tokens with liquidity, fdv, and price to help filter out junk
Boolean(r.liquidity) &&
Boolean(r.fdv) &&
Boolean(r.price)
);
};

0 comments on commit cfbcd27

Please sign in to comment.