@@ -29,11 +29,7 @@ export const getMainnetPrice = async (ctx: Context, height: number, base: Mainne
2929 if ( getPrice ) {
3030 return getPrice ( ctx , height )
3131 }
32- if ( base === 'OETH' && quote === 'USD' ) {
33- const ethusd = await getChainlinkPrice ( ctx , height , 'ETH' , 'USD' )
34- return ethusd * 10n ** 10n
35- }
36- return getChainlinkPrice ( ctx , height , base , quote )
32+ throw new Error ( `No price for ${ base } _${ quote } ` )
3733}
3834
3935const getOETHETHPrice = async ( ctx : Context , height : number ) => {
@@ -94,7 +90,8 @@ const getChainlinkPrice = async (ctx: Context, height: number, base: MainnetCurr
9490
9591const oethOracleCurrencies = new Set ( [ 'WETH' , 'stETH' , 'frxETH' ] )
9692const oethOracleAddress = '0xbE19cC5654e30dAF04AD3B5E06213D70F4e882eE'
97- const getOethOraclePrice = ( ctx : Context , height : number , quote : MainnetCurrency ) => {
93+ const getOethOraclePrice = async ( ctx : Context , height : number , quote : MainnetCurrency ) => {
94+ if ( height < 18032300 ) return 0n
9895 const router = new oethOracleRouter . Contract ( ctx , { height } , oethOracleAddress )
9996 return router . price ( mainnetCurrencies [ quote as MainnetCurrencySymbol ] ?? quote )
10097}
0 commit comments