overtime-live-trading-utils 4.0.0-rc.8 → 4.0.0-rc.9
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 +4 -6
package/package.json
CHANGED
package/src/utils/odds.ts
CHANGED
|
@@ -291,12 +291,10 @@ export const createChildMarkets: (
|
|
|
291
291
|
const maxOdds = leagueInfoByTypeId?.maxOdds; // maximum odds configured for child market (e.g. 0.05 implied probability)
|
|
292
292
|
|
|
293
293
|
if (minOdds && maxOdds) {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
});
|
|
294
|
+
const conditionToAddChildMarket =
|
|
295
|
+
data.type === 'Total'
|
|
296
|
+
? data.odds.some((odd: number) => odd < minOdds && odd > maxOdds)
|
|
297
|
+
: data.odds.every((odd: number) => odd < minOdds && odd > maxOdds);
|
|
300
298
|
if (conditionToAddChildMarket) {
|
|
301
299
|
childMarkets.push(childMarket);
|
|
302
300
|
}
|