overtime-live-trading-utils 4.0.0-rc.16 → 4.0.0-rc.17
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 +6 -2
package/package.json
CHANGED
package/src/utils/odds.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as oddslib from 'oddslib';
|
|
2
|
-
import { MarketType, MarketTypeMap } from 'overtime-utils';
|
|
2
|
+
import { isOneSidePlayerPropsMarket, MarketType, MarketTypeMap } from 'overtime-utils';
|
|
3
3
|
import { DRAW, ZERO } from '../constants/common';
|
|
4
4
|
import { LAST_POLLED_TOO_OLD, NO_MARKETS_FOR_LEAGUE_ID } from '../constants/errors';
|
|
5
5
|
import { MoneylineTypes } from '../enums/sports';
|
|
@@ -462,7 +462,11 @@ export const groupAndFormatTotalOdds = (oddsArray: any[], commonData: HomeAwayTe
|
|
|
462
462
|
|
|
463
463
|
acc.push({
|
|
464
464
|
line: line as any,
|
|
465
|
-
odds: hasOdds
|
|
465
|
+
odds: hasOdds
|
|
466
|
+
? isOneSidePlayerPropsMarket((value as any).typeId)
|
|
467
|
+
? odds.filter((odd) => odd !== null)
|
|
468
|
+
: odds.map((odd) => odd || ZERO)
|
|
469
|
+
: [],
|
|
466
470
|
typeId: !shouldIncreaseTypeId ? (value as any).typeId : Number((value as any).typeId) + 1,
|
|
467
471
|
sportId: (value as any).sportId,
|
|
468
472
|
type: (value as any).type,
|