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