fix auto-refactor
This commit is contained in:
parent
660597f10b
commit
c53957c9b1
|
@ -18,10 +18,10 @@ import {
|
||||||
import { InfoTooltip } from '../info-tooltip'
|
import { InfoTooltip } from '../info-tooltip'
|
||||||
import { useUser } from '../../hooks/use-user'
|
import { useUser } from '../../hooks/use-user'
|
||||||
import {
|
import {
|
||||||
getDpmProbabilityAfterBet,
|
|
||||||
getDpmOutcomeProbability,
|
getDpmOutcomeProbability,
|
||||||
calculateDpmShares,
|
calculateDpmShares,
|
||||||
calculateDpmPayoutAfterCorrectBet,
|
calculateDpmPayoutAfterCorrectBet,
|
||||||
|
getDpmOutcomeProbabilityAfterBet,
|
||||||
} from '../../../common/calculate-dpm'
|
} from '../../../common/calculate-dpm'
|
||||||
import { firebaseLogin } from '../../lib/firebase/users'
|
import { firebaseLogin } from '../../lib/firebase/users'
|
||||||
import { Bet } from '../../../common/bet'
|
import { Bet } from '../../../common/bet'
|
||||||
|
@ -78,7 +78,7 @@ export function AnswerBetPanel(props: {
|
||||||
|
|
||||||
const initialProb = getDpmOutcomeProbability(contract.totalShares, answer.id)
|
const initialProb = getDpmOutcomeProbability(contract.totalShares, answer.id)
|
||||||
|
|
||||||
const resultProb = getDpmProbabilityAfterBet(
|
const resultProb = getDpmOutcomeProbabilityAfterBet(
|
||||||
contract.totalShares,
|
contract.totalShares,
|
||||||
answerId,
|
answerId,
|
||||||
betAmount ?? 0
|
betAmount ?? 0
|
||||||
|
|
|
@ -3,12 +3,7 @@ import _ from 'lodash'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import Textarea from 'react-expanding-textarea'
|
import Textarea from 'react-expanding-textarea'
|
||||||
|
|
||||||
import {
|
import { DPM, FreeResponse, FullContract } from '../../../common/contract'
|
||||||
Contract,
|
|
||||||
DPM,
|
|
||||||
FreeResponse,
|
|
||||||
FullContract,
|
|
||||||
} from '../../../common/contract'
|
|
||||||
import { AmountInput } from '../amount-input'
|
import { AmountInput } from '../amount-input'
|
||||||
import { Col } from '../layout/col'
|
import { Col } from '../layout/col'
|
||||||
import { createAnswer } from '../../lib/firebase/api-call'
|
import { createAnswer } from '../../lib/firebase/api-call'
|
||||||
|
@ -21,9 +16,9 @@ import {
|
||||||
import { InfoTooltip } from '../info-tooltip'
|
import { InfoTooltip } from '../info-tooltip'
|
||||||
import { useUser } from '../../hooks/use-user'
|
import { useUser } from '../../hooks/use-user'
|
||||||
import {
|
import {
|
||||||
getDpmProbabilityAfterBet,
|
|
||||||
calculateDpmShares,
|
calculateDpmShares,
|
||||||
calculateDpmPayoutAfterCorrectBet,
|
calculateDpmPayoutAfterCorrectBet,
|
||||||
|
getDpmOutcomeProbabilityAfterBet,
|
||||||
} from '../../../common/calculate-dpm'
|
} from '../../../common/calculate-dpm'
|
||||||
import { firebaseLogin } from '../../lib/firebase/users'
|
import { firebaseLogin } from '../../lib/firebase/users'
|
||||||
import { Bet } from '../../../common/bet'
|
import { Bet } from '../../../common/bet'
|
||||||
|
@ -59,7 +54,7 @@ export function CreateAnswerPanel(props: {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const resultProb = getDpmProbabilityAfterBet(
|
const resultProb = getDpmOutcomeProbabilityAfterBet(
|
||||||
contract.totalShares,
|
contract.totalShares,
|
||||||
'new',
|
'new',
|
||||||
betAmount ?? 0
|
betAmount ?? 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user