diff --git a/packages/trader/src/Modules/Contract/Components/LastDigitPrediction/last-digit-prediction.tsx b/packages/trader/src/Modules/Contract/Components/LastDigitPrediction/last-digit-prediction.tsx index ea7cdfca1114..806d754cd75f 100644 --- a/packages/trader/src/Modules/Contract/Components/LastDigitPrediction/last-digit-prediction.tsx +++ b/packages/trader/src/Modules/Contract/Components/LastDigitPrediction/last-digit-prediction.tsx @@ -79,11 +79,11 @@ const LastDigitPrediction = ({ [key: string]: (val: number | null) => boolean; } = { DIGITMATCH: (val: number | null) => val === barrier, - DIGITDIFF: (val: number | null) => val !== barrier && !!barrier && !isNaN(barrier), - DIGITOVER: (val: number | null) => !!(val && barrier) && val > barrier, - DIGITUNDER: (val: number | null) => !!(val && barrier) && val < barrier, + DIGITDIFF: (val: number | null) => val !== barrier, + DIGITOVER: (val: number | null) => !!((val || val === 0) && (barrier || barrier === 0)) && val > barrier, + DIGITUNDER: (val: number | null) => !!((val || val === 0) && (barrier || barrier === 0)) && val < barrier, DIGITODD: (val: number | null) => !!val && Boolean(val % 2), - DIGITEVEN: (val: number | null) => !!val && !(val % 2), + DIGITEVEN: (val: number | null) => (!!val && !(val % 2)) || val === 0, }; if (!contract_type || !barrier_map[contract_type]) return null; return barrier_map[contract_type](num) ? num : null;