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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overtime-live-trading-utils",
3
- "version": "4.0.0-rc.3",
3
+ "version": "4.0.0-rc.5",
4
4
  "description": "",
5
5
  "main": "main.js",
6
6
  "scripts": {
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 hasDrawOdds = data.odds.length === 3;
947
- const homeTeamOdds = convertOddsToImpl(data.odds[0]) || ZERO;
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,