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";
6
6
const _getFeeds = async ( cluster : Cluster ) => {
7
7
const unfilteredData = await getPythMetadata ( cluster ) ;
8
8
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
+ } )
14
16
. map ( ( symbol ) => ( {
15
17
symbol,
16
18
product : unfilteredData . productFromSymbol . get ( symbol ) ,
You can’t perform that action at this time.
0 commit comments