fix(trading): live time fraction zero redundant check (#5420)

This commit is contained in:
m.ray 2023-12-02 13:36:58 +02:00 committed by GitHub
parent 7100b0e9fc
commit 80ab8821d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,14 +413,9 @@ export const LiquidityTable = ({
}, },
'text-red-500': ({ data }: { data: LiquidityProvisionData }) => { 'text-red-500': ({ data }: { data: LiquidityProvisionData }) => {
if (!data.sla) return false; if (!data.sla) return false;
return ( return new BigNumber(
new BigNumber( data.sla.currentEpochFractionOfTimeOnBook
data.sla.currentEpochFractionOfTimeOnBook ).isLessThan(data.commitmentMinTimeFraction);
).isLessThan(data.commitmentMinTimeFraction) &&
new BigNumber(
data.sla.currentEpochFractionOfTimeOnBook
).isGreaterThan(0)
);
}, },
}, },
}, },