moved calculate ts for access in firebase
This commit is contained in:
parent
e0bdc70843
commit
8380bf4f72
|
@ -1,12 +1,12 @@
|
|||
import { maxBy } from 'lodash'
|
||||
import { Bet } from './bet'
|
||||
import { Bet } from '../../common/bet'
|
||||
import {
|
||||
calculateCpmmSale,
|
||||
getCpmmProbability,
|
||||
getCpmmOutcomeProbabilityAfterBet,
|
||||
getCpmmProbabilityAfterSale,
|
||||
calculateCpmmSharesAfterFee,
|
||||
} from './calculate-cpmm'
|
||||
} from '../../common/calculate-cpmm'
|
||||
import {
|
||||
calculateDpmPayout,
|
||||
calculateDpmPayoutAfterCorrectBet,
|
||||
|
@ -16,9 +16,13 @@ import {
|
|||
getDpmProbability,
|
||||
getDpmOutcomeProbabilityAfterBet,
|
||||
getDpmProbabilityAfterSale,
|
||||
} from './calculate-dpm'
|
||||
import { calculateFixedPayout } from './calculate-fixed-payouts'
|
||||
import { Contract, BinaryContract, FreeResponseContract } from './contract'
|
||||
} from '../../common/calculate-dpm'
|
||||
import { calculateFixedPayout } from '../../common/calculate-fixed-payouts'
|
||||
import {
|
||||
Contract,
|
||||
BinaryContract,
|
||||
FreeResponseContract,
|
||||
} from '../../common/contract'
|
||||
|
||||
export function getProbability(contract: BinaryContract) {
|
||||
return contract.mechanism === 'cpmm-1'
|
|
@ -17,7 +17,7 @@ import { removeUndefinedProps } from '../../common/util/object'
|
|||
import { LiquidityProvision } from '../../common/liquidity-provision'
|
||||
import { getValues } from './utils'
|
||||
import { batchedWaitAll } from '../../common/util/promise'
|
||||
import { getProbability } from 'common/calculate'
|
||||
import { getProbability } from '../shared/calculate'
|
||||
|
||||
export const resolveMarket = functions
|
||||
.runWith({ minInstances: 1 })
|
||||
|
|
|
@ -44,7 +44,7 @@ import {
|
|||
getContractBetMetrics,
|
||||
resolvedPayout,
|
||||
getContractBetNullMetrics,
|
||||
} from 'common/calculate'
|
||||
} from 'functions/shared/calculate'
|
||||
import { useTimeSinceFirstRender } from 'web/hooks/use-time-since-first-render'
|
||||
import { trackLatency } from 'web/lib/firebase/tracking'
|
||||
import { NumericContract } from 'common/contract'
|
||||
|
|
|
@ -9,7 +9,7 @@ import { ResolveConfirmationButton } from './confirmation-button'
|
|||
import { resolveMarket } from 'web/lib/firebase/fn-call'
|
||||
import { ProbabilitySelector } from './probability-selector'
|
||||
import { DPM_CREATOR_FEE } from 'common/fees'
|
||||
import { getProbability } from 'common/calculate'
|
||||
import { getProbability } from 'functions/shared/calculate'
|
||||
import { BinaryContract, resolution } from 'common/contract'
|
||||
import { formatMoney } from 'common/util/format'
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user