rename 'calculate.ts' => 'calculate-dpm.ts'
This commit is contained in:
parent
d91abf4faf
commit
e80926d201
|
@ -1,5 +1,5 @@
|
|||
import { Bet } from './bet'
|
||||
import { getProbability } from './calculate'
|
||||
import { getProbability } from './calculate-dpm'
|
||||
import { getCpmmProbability } from './calculate-cpmm'
|
||||
import { Binary, CPMM, DPM, FreeResponse, FullContract } from './contract'
|
||||
import { User } from './user'
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
calculateShares,
|
||||
getProbability,
|
||||
getOutcomeProbability,
|
||||
} from './calculate'
|
||||
} from './calculate-dpm'
|
||||
import { calculateCpmmShares, getCpmmProbability } from './calculate-cpmm'
|
||||
import {
|
||||
Binary,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as _ from 'lodash'
|
||||
|
||||
import { Bet } from './bet'
|
||||
import { deductFees, getProbability } from './calculate'
|
||||
import { deductFees, getProbability } from './calculate-dpm'
|
||||
import {
|
||||
Binary,
|
||||
Contract,
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
import { Bet } from './bet'
|
||||
import { calculateShareValue, deductFees, getProbability } from './calculate'
|
||||
import {
|
||||
calculateShareValue,
|
||||
deductFees,
|
||||
getProbability,
|
||||
} from './calculate-dpm'
|
||||
import {
|
||||
calculateCpmmSale,
|
||||
calculateCpmmShareValue,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import _ = require('lodash')
|
||||
import { Answer } from '../../common/answer'
|
||||
import { Bet } from '../../common/bet'
|
||||
import { getProbability } from '../../common/calculate'
|
||||
import { getProbability } from '../../common/calculate-dpm'
|
||||
import { Comment } from '../../common/comment'
|
||||
import { Contract } from '../../common/contract'
|
||||
import { CREATOR_FEE } from '../../common/fees'
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as _ from 'lodash'
|
|||
|
||||
import { getValues } from './utils'
|
||||
import { Contract } from '../../common/contract'
|
||||
import { getProbability } from '../../common/calculate'
|
||||
import { getProbability } from '../../common/calculate-dpm'
|
||||
|
||||
const cache = { lastUpdated: 0, data: '' }
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import { initAdmin } from './script-init'
|
|||
initAdmin('stephen')
|
||||
|
||||
import { Bet } from '../../../common/bet'
|
||||
import { getProbability } from '../../../common/calculate'
|
||||
import { getProbability } from '../../../common/calculate-dpm'
|
||||
import { Contract } from '../../../common/contract'
|
||||
|
||||
type DocRef = admin.firestore.DocumentReference
|
||||
|
|
|
@ -6,7 +6,7 @@ initAdmin('stephenDev')
|
|||
|
||||
import { Contract } from '../../../common/contract'
|
||||
import { Bet } from '../../../common/bet'
|
||||
import { calculateShares, getProbability } from '../../../common/calculate'
|
||||
import { calculateShares, getProbability } from '../../../common/calculate-dpm'
|
||||
import { getSellBetInfo } from '../../../common/sell-bet'
|
||||
import { User } from '../../../common/user'
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { getValues } from './utils'
|
|||
import { Contract } from '../../common/contract'
|
||||
import { Bet } from '../../common/bet'
|
||||
import { User } from '../../common/user'
|
||||
import { calculatePayout } from '../../common/calculate'
|
||||
import { calculatePayout } from '../../common/calculate-dpm'
|
||||
|
||||
const firestore = admin.firestore()
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import {
|
|||
getOutcomeProbability,
|
||||
calculateShares,
|
||||
calculatePayoutAfterCorrectBet,
|
||||
} from '../../../common/calculate'
|
||||
} from '../../../common/calculate-dpm'
|
||||
import { firebaseLogin } from '../../lib/firebase/users'
|
||||
import { Bet } from '../../../common/bet'
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { Avatar } from '../avatar'
|
|||
import { SiteLink } from '../site-link'
|
||||
import { BuyButton } from '../yes-no-selector'
|
||||
import { formatPercent } from '../../../common/util/format'
|
||||
import { getOutcomeProbability } from '../../../common/calculate'
|
||||
import { getOutcomeProbability } from '../../../common/calculate-dpm'
|
||||
import { tradingAllowed } from '../../lib/firebase/contracts'
|
||||
import { AnswerBetPanel } from './answer-bet-panel'
|
||||
import { ContractFeed } from '../contract-feed'
|
||||
|
|
|
@ -6,7 +6,7 @@ import { DPM, FreeResponse, FullContract } from '../../../common/contract'
|
|||
import { Col } from '../layout/col'
|
||||
import { formatPercent } from '../../../common/util/format'
|
||||
import { useUser } from '../../hooks/use-user'
|
||||
import { getOutcomeProbability } from '../../../common/calculate'
|
||||
import { getOutcomeProbability } from '../../../common/calculate-dpm'
|
||||
import { useAnswers } from '../../hooks/use-answers'
|
||||
import { tradingAllowed } from '../../lib/firebase/contracts'
|
||||
import { AnswerItem } from './answer-item'
|
||||
|
|
|
@ -24,7 +24,7 @@ import {
|
|||
getProbabilityAfterBet,
|
||||
calculateShares,
|
||||
calculatePayoutAfterCorrectBet,
|
||||
} from '../../../common/calculate'
|
||||
} from '../../../common/calculate-dpm'
|
||||
import { firebaseLogin } from '../../lib/firebase/users'
|
||||
import { Bet } from '../../../common/bet'
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
calculateShares,
|
||||
getProbabilityAfterBet,
|
||||
calculatePayoutAfterCorrectBet,
|
||||
} from '../../common/calculate'
|
||||
} from '../../common/calculate-dpm'
|
||||
import { firebaseLogin } from '../lib/firebase/users'
|
||||
import { Bet } from '../../common/bet'
|
||||
import { placeBet } from '../lib/firebase/api-call'
|
||||
|
|
|
@ -29,7 +29,7 @@ import {
|
|||
getProbability,
|
||||
getProbabilityAfterSale,
|
||||
resolvedPayout,
|
||||
} from '../../common/calculate'
|
||||
} from '../../common/calculate-dpm'
|
||||
import { sellBet } from '../lib/firebase/api-call'
|
||||
import { ConfirmationButton } from './confirmation-button'
|
||||
import { OutcomeLabel, YesLabel, NoLabel } from './outcome-label'
|
||||
|
|
|
@ -2,7 +2,7 @@ import { DatumValue } from '@nivo/core'
|
|||
import { ResponsiveLine } from '@nivo/line'
|
||||
import dayjs from 'dayjs'
|
||||
import { Bet } from '../../common/bet'
|
||||
import { getProbability } from '../../common/calculate'
|
||||
import { getProbability } from '../../common/calculate-dpm'
|
||||
import { useBetsWithoutAntes } from '../hooks/use-bets'
|
||||
import { useWindowSize } from '../hooks/use-window-size'
|
||||
import { Contract } from '../lib/firebase/contracts'
|
||||
|
|
|
@ -10,7 +10,7 @@ import { Spacer } from './layout/spacer'
|
|||
import { ResolveConfirmationButton } from './confirmation-button'
|
||||
import { resolveMarket } from '../lib/firebase/api-call'
|
||||
import { ProbabilitySelector } from './probability-selector'
|
||||
import { getProbability } from '../../common/calculate'
|
||||
import { getProbability } from '../../common/calculate-dpm'
|
||||
import { CREATOR_FEE } from '../../common/fees'
|
||||
|
||||
export function ResolutionPanel(props: {
|
||||
|
|
|
@ -18,7 +18,7 @@ import _ from 'lodash'
|
|||
import { app } from './init'
|
||||
import { getValues, listenForValue, listenForValues } from './utils'
|
||||
import { Binary, Contract, FullContract } from '../../../common/contract'
|
||||
import { getProbability } from '../../../common/calculate'
|
||||
import { getProbability } from '../../../common/calculate-dpm'
|
||||
import { createRNG, shuffle } from '../../../common/util/random'
|
||||
import { getCpmmProbability } from '../../../common/calculate-cpmm'
|
||||
export type { Contract }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Bet } from '../../../../common/bet'
|
||||
import { getProbability } from '../../../../common/calculate'
|
||||
import { getProbability } from '../../../../common/calculate-dpm'
|
||||
import { Comment } from '../../../../common/comment'
|
||||
import { Contract } from '../../../../common/contract'
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import dayjs from 'dayjs'
|
|||
import Link from 'next/link'
|
||||
import { useState } from 'react'
|
||||
import Textarea from 'react-expanding-textarea'
|
||||
import { getProbability } from '../../common/calculate'
|
||||
import { getProbability } from '../../common/calculate-dpm'
|
||||
import { parseWordsAsTags } from '../../common/util/parse'
|
||||
import { AmountInput } from '../components/amount-input'
|
||||
import { InfoTooltip } from '../components/info-tooltip'
|
||||
|
|
Loading…
Reference in New Issue
Block a user