@@ -20,6 +20,8 @@ import { MeritIncentivesTooltipContent } from './MeritIncentivesTooltipContent';
2020import { MerklIncentivesTooltipContent } from './MerklIncentivesTooltipContent' ;
2121import { SonicAirdropTooltipContent } from './SonicIncentivesTooltipContent' ;
2222
23+ const INFINITY = 'Infinity' ;
24+
2325export type IconProps = {
2426 className ?: string ;
2527 width ?: string | number ;
@@ -263,18 +265,16 @@ export const IncentivesButton = ({
263265 }
264266 }
265267
266- const isIncentivesInfinity = incentives . some (
267- ( incentive ) => incentive . incentiveAPR === 'Infinity'
268- ) ;
268+ const isIncentivesInfinity = incentives . some ( ( incentive ) => incentive . incentiveAPR === INFINITY ) ;
269269 const incentivesAPRSum = isIncentivesInfinity
270- ? 'Infinity'
270+ ? INFINITY
271271 : incentives . reduce ( ( aIncentive , bIncentive ) => aIncentive + + bIncentive . incentiveAPR , 0 ) ;
272272
273273 const incentivesNetAPR = isIncentivesInfinity
274- ? 'Infinity'
275- : incentivesAPRSum !== 'Infinity'
274+ ? INFINITY
275+ : incentivesAPRSum !== INFINITY
276276 ? valueToBigNumber ( incentivesAPRSum || 0 ) . toNumber ( )
277- : 'Infinity' ;
277+ : INFINITY ;
278278
279279 return (
280280 < ContentWithTooltip
@@ -309,7 +309,7 @@ const Content = ({
309309 plus,
310310} : {
311311 incentives : ReserveIncentiveResponse [ ] ;
312- incentivesNetAPR : number | 'Infinity' ;
312+ incentivesNetAPR : number | typeof INFINITY ;
313313 displayBlank ?: boolean ;
314314 plus ?: boolean ;
315315} ) => {
@@ -343,7 +343,7 @@ const Content = ({
343343 ) ;
344344
345345 if ( hasGhoIncentives ) {
346- if ( incentivesNetAPR !== 'Infinity' && incentivesNetAPR < 10000 ) {
346+ if ( incentivesNetAPR !== INFINITY && incentivesNetAPR < 10000 ) {
347347 return (
348348 < Box sx = { { display : 'flex' , alignItems : 'center' , gap : 0.5 } } >
349349 < FormattedNumber
@@ -355,7 +355,7 @@ const Content = ({
355355 < IncentivesIcon width = "16" height = "16" />
356356 </ Box >
357357 ) ;
358- } else if ( incentivesNetAPR !== 'Infinity' && incentivesNetAPR > 9999 ) {
358+ } else if ( incentivesNetAPR !== INFINITY && incentivesNetAPR > 9999 ) {
359359 return (
360360 < Box sx = { { display : 'flex' , alignItems : 'center' , gap : 0.5 } } >
361361 < FormattedNumber
@@ -368,7 +368,7 @@ const Content = ({
368368 < IncentivesIcon width = "16" height = "16" />
369369 </ Box >
370370 ) ;
371- } else if ( incentivesNetAPR === 'Infinity' ) {
371+ } else if ( incentivesNetAPR === INFINITY ) {
372372 return (
373373 < Box sx = { { display : 'flex' , alignItems : 'center' , gap : 0.5 } } >
374374 < Typography variant = "main12" color = "text.secondary" >
@@ -393,15 +393,12 @@ const Content = ({
393393 return (
394394 < Box
395395 sx = { ( ) => ( {
396- // p: { xs: '0 4px', xsm: '2px 4px' },
397- // border: `1px solid ${open ? theme.palette.action.disabled : theme.palette.divider}`,
398396 borderRadius : '4px' ,
399397 cursor : 'pointer' ,
400398 display : 'flex' ,
401399 alignItems : 'center' ,
402400 justifyContent : 'center' ,
403401 transition : 'opacity 0.2s ease' ,
404- // bgcolor: open ? 'action.hover' : 'transparent',
405402 '&:hover' : {
406403 bgcolor : 'action.hover' ,
407404 borderColor : 'action.disabled' ,
0 commit comments