Skip to content

Commit 1b147ed

Browse files
committed
v4.3.3
1 parent 959ec38 commit 1b147ed

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azuro-org/toolkit",
3-
"version": "4.3.2",
3+
"version": "4.3.3",
44
"description": "Set of helpers to work with Azuro protocol",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/utils/calcOdds.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@ export const calcPrematchOdds = async (props: CalcPrematchOddsProps): Promise<Re
166166
})
167167

168168
odds = selections.reduce((acc, { conditionId, outcomeId }, index) => {
169+
const key = `${conditionId}-${outcomeId}`
169170
const result = response[index]?.result
170-
acc[`${conditionId}-${outcomeId}`] = formatToFixed(formatUnits(typeof result === 'bigint' ? result : 0n, ODDS_DECIMALS), 3)
171+
172+
acc[key] = formatToFixed(formatUnits(typeof result === 'bigint' ? result : 0n, ODDS_DECIMALS), 5)
171173

172174
return acc
173175
}, {} as Record<string, number>)
@@ -198,7 +200,7 @@ export const calcPrematchOdds = async (props: CalcPrematchOddsProps): Promise<Re
198200
return selections.reduce((acc, { conditionId, outcomeId }, index) => {
199201
const key = `${conditionId}-${outcomeId}`
200202

201-
acc[key] = formatToFixed(formatUnits(conditionOdds[index]!, ODDS_DECIMALS), 3)
203+
acc[key] = formatToFixed(formatUnits(conditionOdds[index]!, ODDS_DECIMALS), 5)
202204

203205
return acc
204206
}, {} as Record<string, number>)

0 commit comments

Comments
 (0)