-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live spread and total #1
base: main
Are you sure you want to change the base?
Conversation
* @readonly | ||
* @enum {number} | ||
*/ | ||
export const statusCodes = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
src/constants/constantsOpticodds.ts
Outdated
@@ -0,0 +1,155 @@ | |||
export const FIRST_HALF_ASIAN_HANDICAP = '1st Half Asian Handicap'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Group as enum.
src/constants/sports.ts
Outdated
@@ -10,21 +20,29 @@ export const LeagueMap: Record<number, any> = { | |||
sport: Sport.FOOTBALL, | |||
id: League.NFL, | |||
isDrawAvailable: false, | |||
spread: POINT_SPREAD, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge with LeagueMap from API.
homeOdds: 0, | ||
awayOdds: 0, | ||
drawOdds: 0, | ||
errorMessage: 'Returning zero odds cause bookmakers have 0 or 1 odds', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add bookmaker in error message.
src/utils/odds.ts
Outdated
|
||
// TODO: change to for each | ||
return formattedSpreadOdds | ||
.map(({ line, odds }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use forEach, unify with total, move common code in separate method.
No description provided.