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 }>(
210210 feeds : T [ ] ,
211211 symbols : string [ ] ,
212212) : 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 ) ;
221216
222217const isActive = ( feed : { price : { minPublishers : number } } ) =>
223218 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 = {
77 "Commodities.WTI1M" ,
88 "Crypto.1INCH/USD" ,
99 ] ,
10- featuredComingSoon : [ "Crypto.ION/USD" , "Equity.NL.BCOIN/USD "] ,
10+ featuredComingSoon : [ "Rates.US1Y " ] ,
1111} ;
You can’t perform that action at this time.
0 commit comments