fix(trading): do not show tick or cross for rewards that will start in the future (#6052)

This commit is contained in:
m.ray 2024-03-20 15:10:35 +02:00 committed by GitHub
parent c0396db2b1
commit ecdd917977
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -251,6 +251,7 @@ const RewardCard = ({
vegaAsset={vegaAsset}
requirements={requirements}
gameId={gameId}
startsIn={startsIn}
/>
)}
</div>
@ -534,12 +535,14 @@ const RewardRequirements = ({
vegaAsset,
requirements,
gameId,
startsIn,
}: {
dispatchStrategy: DispatchStrategy;
rewardAsset?: BasicAssetDetails;
vegaAsset?: BasicAssetDetails;
requirements?: Requirements;
gameId?: string | null;
startsIn?: number;
}) => {
const t = useT();
@ -654,6 +657,7 @@ const RewardRequirements = ({
>
{requirements &&
averagePositionRequirements &&
!startsIn &&
(new BigNumber(averagePosition || 0).isGreaterThan(
averagePositionRequirements
) ? (