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:@typescript-eslint/recommended',
|
||||||
'plugin:react-hooks/recommended',
|
'plugin:react-hooks/recommended',
|
||||||
'plugin:@next/next/recommended',
|
'plugin:@next/next/recommended',
|
||||||
|
'prettier',
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
'@typescript-eslint/no-empty-function': 'off',
|
'@typescript-eslint/no-empty-function': 'off',
|
||||||
|
|
|
@ -97,6 +97,11 @@ export function toLiteMarket(contract: Contract): LiteMarket {
|
||||||
const probability =
|
const probability =
|
||||||
contract.outcomeType === 'BINARY' ? getProbability(contract) : undefined
|
contract.outcomeType === 'BINARY' ? getProbability(contract) : undefined
|
||||||
|
|
||||||
|
let min, max, isLogScale: any
|
||||||
|
if (contract.outcomeType === 'PSEUDO_NUMERIC') {
|
||||||
|
;({ min, max, isLogScale } = contract)
|
||||||
|
}
|
||||||
|
|
||||||
return removeUndefinedProps({
|
return removeUndefinedProps({
|
||||||
id,
|
id,
|
||||||
creatorUsername,
|
creatorUsername,
|
||||||
|
@ -124,6 +129,9 @@ export function toLiteMarket(contract: Contract): LiteMarket {
|
||||||
resolution,
|
resolution,
|
||||||
resolutionTime,
|
resolutionTime,
|
||||||
resolutionProbability,
|
resolutionProbability,
|
||||||
|
min,
|
||||||
|
max,
|
||||||
|
isLogScale,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user