overtime-live-trading-utils 4.0.0-rc.3 → 4.0.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.js +1 -1
- package/package.json +1 -1
- package/src/utils/odds.ts +2 -7
package/package.json
CHANGED
package/src/utils/odds.ts
CHANGED
|
@@ -943,13 +943,8 @@ export const adjustSpreadOnChildOdds = (
|
|
|
943
943
|
) => {
|
|
944
944
|
const result: any[] = [];
|
|
945
945
|
iterableGroupedOdds.forEach((data) => {
|
|
946
|
-
const
|
|
947
|
-
const
|
|
948
|
-
const awayTeamOdds = convertOddsToImpl(data.odds[1]) || ZERO;
|
|
949
|
-
const drawOdds = convertOddsToImpl(data.odds[2]) || ZERO;
|
|
950
|
-
const odds = hasDrawOdds ? [homeTeamOdds, awayTeamOdds, drawOdds] : [homeTeamOdds, awayTeamOdds];
|
|
951
|
-
|
|
952
|
-
const isZeroOddsChild = homeTeamOdds === ZERO || awayTeamOdds === ZERO || (hasDrawOdds && drawOdds === ZERO);
|
|
946
|
+
const odds = data.odds.map((odd: number) => convertOddsToImpl(odd) || ZERO);
|
|
947
|
+
const isZeroOddsChild = odds.includes(ZERO);
|
|
953
948
|
if (!isZeroOddsChild) {
|
|
954
949
|
const spreadData = getSpreadData(
|
|
955
950
|
spreadDataForSport,
|