contrain contract type
This commit is contained in:
parent
30241ee0f2
commit
3344218fbb
|
@ -6,7 +6,11 @@ import { Bet } from 'common/bet'
|
|||
import { getProbability } from 'common/calculate'
|
||||
import { getValueFromBucket } from 'common/calculate-dpm'
|
||||
import { Comment } from 'common/comment'
|
||||
import { Contract, FreeResponseContract } from 'common/contract'
|
||||
import {
|
||||
Contract,
|
||||
FreeResponseContract,
|
||||
NumericContract,
|
||||
} from 'common/contract'
|
||||
import { DPM_CREATOR_FEE } from 'common/fees'
|
||||
import { PrivateUser, User } from 'common/user'
|
||||
import { formatMoney, formatPercent } from 'common/util/format'
|
||||
|
@ -106,7 +110,7 @@ const toDisplayResolution = (
|
|||
if (resolution === 'MKT' && resolutions) return 'MULTI'
|
||||
if (resolution === 'CANCEL') return 'N/A'
|
||||
|
||||
if (contract.outcomeType === 'NUMERIC')
|
||||
if (contract.outcomeType === 'NUMERIC' && contract.mechanism === 'dpm-2')
|
||||
return getValueFromBucket(resolution, contract).toString()
|
||||
|
||||
const answer = (contract as FreeResponseContract).answers?.find(
|
||||
|
|
Loading…
Reference in New Issue
Block a user