File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -210,21 +210,9 @@ const filterFeeds = <T extends { symbol: string }>(
210
210
feeds : T [ ] ,
211
211
symbols : string [ ] ,
212
212
) : T [ ] =>
213
- symbols . map ( ( symbol ) => {
214
- const feed = feeds . find ( ( feed ) => feed . symbol === symbol ) ;
215
- if ( feed ) {
216
- return feed ;
217
- } else {
218
- throw new NoSuchFeedError ( symbol ) ;
219
- }
220
- } ) ;
213
+ symbols
214
+ . map ( ( symbol ) => feeds . find ( ( feed ) => feed . symbol === symbol ) )
215
+ . filter ( ( feed ) => feed !== undefined ) ;
221
216
222
217
const isActive = ( feed : { price : { minPublishers : number } } ) =>
223
218
feed . price . minPublishers <= 50 ;
224
-
225
- class NoSuchFeedError extends Error {
226
- constructor ( symbol : string ) {
227
- super ( `No feed exists named ${ symbol } ` ) ;
228
- this . name = "NoSuchFeedError" ;
229
- }
230
- }
Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ export const priceFeeds = {
7
7
"Commodities.WTI1M" ,
8
8
"Crypto.1INCH/USD" ,
9
9
] ,
10
- featuredComingSoon : [ "Crypto.ION/USD" , "Equity.NL.BCOIN/USD "] ,
10
+ featuredComingSoon : [ "Rates.US1Y " ] ,
11
11
} ;
You can’t perform that action at this time.
0 commit comments