Add min, max, isLogScale to numeric market API return
This commit is contained in:
parent
779b6dfc0c
commit
20f3fa9eec
|
@ -5,6 +5,7 @@ module.exports = {
|
|||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:@next/next/recommended',
|
||||
'prettier',
|
||||
],
|
||||
rules: {
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
|
|
|
@ -97,6 +97,11 @@ export function toLiteMarket(contract: Contract): LiteMarket {
|
|||
const probability =
|
||||
contract.outcomeType === 'BINARY' ? getProbability(contract) : undefined
|
||||
|
||||
let min, max, isLogScale: any
|
||||
if (contract.outcomeType === 'PSEUDO_NUMERIC') {
|
||||
;({ min, max, isLogScale } = contract)
|
||||
}
|
||||
|
||||
return removeUndefinedProps({
|
||||
id,
|
||||
creatorUsername,
|
||||
|
@ -124,6 +129,9 @@ export function toLiteMarket(contract: Contract): LiteMarket {
|
|||
resolution,
|
||||
resolutionTime,
|
||||
resolutionProbability,
|
||||
min,
|
||||
max,
|
||||
isLogScale,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user