File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
apps/insights/src/services/pyth Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,13 @@ import { priceFeedsSchema } from "../../schemas/pyth/price-feeds-schema";
66const _getFeeds = async ( cluster : Cluster ) => {
77 const unfilteredData = await getPythMetadata ( cluster ) ;
88 const filtered = unfilteredData . symbols
9- . filter (
10- ( symbol ) =>
11- unfilteredData . productFromSymbol . get ( symbol ) ?. display_symbol !==
12- undefined ,
13- )
9+ . filter ( ( symbol ) => {
10+ const product = unfilteredData . productFromSymbol . get ( symbol ) ;
11+ const hasDisplaySymbol = product ?. display_symbol !== undefined ;
12+ const hasPriceAccount = product ?. price_account !== undefined ;
13+
14+ return hasDisplaySymbol && hasPriceAccount ;
15+ } )
1416 . map ( ( symbol ) => ( {
1517 symbol,
1618 product : unfilteredData . productFromSymbol . get ( symbol ) ,
You can’t perform that action at this time.
0 commit comments