@@ -2,7 +2,7 @@ import React, { useMemo, useState, createContext, useContext } from "react";
22import { useParams } from "react-router-dom" ;
33import { ONE_BASIS_POINT } from "consts/index" ;
44import { Periods } from "consts/periods" ;
5- import { notUndefined } from "utils/index" ;
5+ import { isUndefined } from "utils/index" ;
66import { useGetMetaEvidence } from "queries/useGetMetaEvidence" ;
77import { useAppealCost } from "queries/useAppealCost" ;
88import { useDisputeKitClassicMultipliers } from "queries/useDisputeKitClassicMultipliers" ;
@@ -110,12 +110,12 @@ const getWinningChoice = (dispute?: ClassicAppealQuery["dispute"]) => {
110110} ;
111111
112112const getLoserRequiredFunding = ( appealCost : bigint , loser_stake_multiplier : bigint ) : bigint =>
113- notUndefined ( [ appealCost , loser_stake_multiplier ] )
113+ ! isUndefined ( appealCost ) && ! isUndefined ( loser_stake_multiplier )
114114 ? appealCost + ( loser_stake_multiplier * appealCost ) / ONE_BASIS_POINT
115115 : 0n ;
116116
117117const getWinnerRequiredFunding = ( appealCost : bigint , winner_stake_multiplier : bigint ) : bigint =>
118- notUndefined ( [ appealCost , winner_stake_multiplier ] )
118+ ! isUndefined ( appealCost ) && ! isUndefined ( winner_stake_multiplier )
119119 ? appealCost + ( winner_stake_multiplier * appealCost ) / ONE_BASIS_POINT
120120 : 0n ;
121121
@@ -130,7 +130,7 @@ const getDeadline = (lastPeriodChange: string, appealPeriodDuration: string, los
130130function useLoserSideCountdown ( lastPeriodChange : string , appealPeriodDuration : string , loserTimeMultiplier : string ) {
131131 const deadline = useMemo (
132132 ( ) =>
133- notUndefined ( [ lastPeriodChange , appealPeriodDuration , loserTimeMultiplier ] )
133+ ! isUndefined ( lastPeriodChange ) && ! isUndefined ( appealPeriodDuration ) && ! isUndefined ( loserTimeMultiplier )
134134 ? getDeadline ( lastPeriodChange , appealPeriodDuration , loserTimeMultiplier )
135135 : 0 ,
136136 [ lastPeriodChange , appealPeriodDuration , loserTimeMultiplier ]
0 commit comments