11import { Box } from '@mui/material' ;
22import { ParentSize } from '@visx/responsive' ;
3- import {
4- type ReserveWithId ,
5- useAppDataContext ,
6- } from 'src/hooks/app-data-provider/useAppDataProvider' ;
3+ import { type ReserveWithId } from 'src/hooks/app-data-provider/useAppDataProvider' ;
74
85import { GraphLegend } from './GraphLegend' ;
96import { InterestRateModelGraph } from './InterestRateModelGraph' ;
@@ -20,12 +17,6 @@ export type Fields = { name: Field; color: string; text: string }[];
2017export const InterestRateModelGraphContainer = ( {
2118 reserve,
2219} : InteresetRateModelGraphContainerProps ) : JSX . Element => {
23- const { reserves : reservesLegacy } = useAppDataContext ( ) ;
24-
25- const reserveData = reservesLegacy . find (
26- ( r ) => r . underlyingAsset . toLowerCase ( ) === reserve . underlyingToken . address . toLowerCase ( )
27- ) ;
28-
2920 const CHART_HEIGHT = 155 ;
3021 const fields : Fields = [
3122 { name : 'variableBorrowRate' , text : 'Borrow APR, variable' , color : '#B6509E' } ,
@@ -50,7 +41,7 @@ export const InterestRateModelGraphContainer = ({
5041 height = { CHART_HEIGHT }
5142 fields = { fields }
5243 reserve = { {
53- baseVariableBorrowRate : String ( reserveData ?. baseVariableBorrowRate ) ,
44+ baseVariableBorrowRate : String ( reserve . borrowInfo ?. baseVariableBorrowRate . raw ) ,
5445 optimalUsageRatio : String ( reserve . borrowInfo ?. optimalUsageRate . raw ) ,
5546 utilizationRate : String ( reserve . borrowInfo ?. utilizationRate . value ) ,
5647 variableRateSlope1 : String ( reserve . borrowInfo ?. variableRateSlope1 . raw ) ,
0 commit comments