using the type "resolution"
This commit is contained in:
parent
01adc91a67
commit
5315eb3600
|
@ -6,7 +6,7 @@ import {
|
|||
} from 'common/calculate'
|
||||
import { getExpectedValue } from 'common/calculate-dpm'
|
||||
import { User } from 'common/user'
|
||||
import { Contract, NumericContract } from 'common/contract'
|
||||
import { Contract, NumericContract, resolution } from 'common/contract'
|
||||
import {
|
||||
formatLargeNumber,
|
||||
formatMoney,
|
||||
|
@ -264,7 +264,7 @@ export function getColor(contract: Contract, previewProb?: number) {
|
|||
const { resolution } = contract
|
||||
if (resolution) {
|
||||
return (
|
||||
OUTCOME_TO_COLOR[resolution as 'YES' | 'NO' | 'CANCEL' | 'MKT'] ??
|
||||
OUTCOME_TO_COLOR[resolution as resolution] ??
|
||||
// If resolved to a FR answer, use 'primary'
|
||||
'primary'
|
||||
)
|
||||
|
|
|
@ -41,7 +41,7 @@ export function OutcomeLabel(props: {
|
|||
}
|
||||
|
||||
export function BinaryOutcomeLabel(props: {
|
||||
outcome: 'YES' | 'NO' | 'CANCEL' | 'MKT'
|
||||
outcome: resolution
|
||||
}) {
|
||||
const { outcome } = props
|
||||
|
||||
|
@ -53,7 +53,7 @@ export function BinaryOutcomeLabel(props: {
|
|||
|
||||
export function BinaryContractOutcomeLabel(props: {
|
||||
contract: BinaryContract
|
||||
resolution: 'YES' | 'NO' | 'CANCEL' | 'MKT'
|
||||
resolution: resolution
|
||||
}) {
|
||||
const { contract, resolution } = props
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user