Remove console.logs
This commit is contained in:
parent
05a2ada858
commit
d8202cb029
|
@ -57,7 +57,6 @@ const computeFill = (
|
|||
: floatingLesserEqual(prob, limitProb) &&
|
||||
(matchedBet?.limitProb ?? 0) < limitProb)
|
||||
) {
|
||||
console.log('no fill', amount, outcome, prob, limitProb)
|
||||
// No fill.
|
||||
return undefined
|
||||
}
|
||||
|
@ -89,15 +88,6 @@ const computeFill = (
|
|||
)
|
||||
const newState = { pool: newPool, p: newP }
|
||||
|
||||
console.log(
|
||||
'fill from pool',
|
||||
poolAmount,
|
||||
'/',
|
||||
amount,
|
||||
outcome,
|
||||
prob,
|
||||
limitProb
|
||||
)
|
||||
return {
|
||||
maker: {
|
||||
matchedBetId: null,
|
||||
|
@ -125,15 +115,6 @@ const computeFill = (
|
|||
(outcome === 'YES' ? 1 - matchedBet.limitProb : matchedBet.limitProb)
|
||||
)
|
||||
|
||||
console.log(
|
||||
'fill from matchedBet',
|
||||
amount,
|
||||
matchRemaining,
|
||||
shares,
|
||||
outcome,
|
||||
limitProb
|
||||
)
|
||||
|
||||
const maker = {
|
||||
bet: matchedBet,
|
||||
matchedBetId: 'taker',
|
||||
|
@ -167,8 +148,6 @@ export const getBinaryCpmmBetInfo = (
|
|||
(bet) => bet.createdTime
|
||||
)
|
||||
|
||||
console.log({ outcome, betAmount, limitProb, sortedBets })
|
||||
|
||||
const takers: fill[] = []
|
||||
const makers: {
|
||||
bet: LimitBet
|
||||
|
@ -206,8 +185,6 @@ export const getBinaryCpmmBetInfo = (
|
|||
if (floatingEqual(amount, 0)) break
|
||||
}
|
||||
|
||||
console.log({ makers, takers })
|
||||
|
||||
const probBefore = getCpmmProbability(contract.pool, contract.p)
|
||||
const probAfter = getCpmmProbability(cpmmState.pool, cpmmState.p)
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ import {
|
|||
calculateCpmmSale,
|
||||
getCpmmProbability,
|
||||
getCpmmLiquidityFee,
|
||||
calculateCpmmAmount,
|
||||
} from 'common/calculate-cpmm'
|
||||
import {
|
||||
getFormattedMappedValue,
|
||||
|
@ -334,12 +333,6 @@ function BuyPanel(props: {
|
|||
|
||||
const betDisabled = isSubmitting || !betAmount || error
|
||||
|
||||
const amountToGoToProb = calculateCpmmAmount(
|
||||
contract,
|
||||
(limitProb ?? initialProb * 100) / 100,
|
||||
betChoice ?? 'YES'
|
||||
)
|
||||
|
||||
const limitProbFrac = (limitProb ?? 0) / 100
|
||||
|
||||
const { newPool, newP, newBet } = getBinaryCpmmBetInfo(
|
||||
|
@ -350,15 +343,6 @@ function BuyPanel(props: {
|
|||
unfilledBets as LimitBet[]
|
||||
)
|
||||
|
||||
console.log(
|
||||
'limitProb',
|
||||
limitProb,
|
||||
'amountToGoToProb',
|
||||
amountToGoToProb,
|
||||
'unfilledBets',
|
||||
unfilledBets
|
||||
)
|
||||
|
||||
const resultProb = getCpmmProbability(newPool, newP)
|
||||
const matchedAmount = sumBy(newBet.fills, (fill) => fill.amount)
|
||||
const filledShares = sumBy(newBet.fills, (fill) => fill.shares)
|
||||
|
@ -367,19 +351,6 @@ function BuyPanel(props: {
|
|||
((betAmount ?? 0) - matchedAmount) /
|
||||
(betChoice === 'YES' ? limitProbFrac : 1 - limitProbFrac)
|
||||
|
||||
console.log(
|
||||
'overallShares',
|
||||
overallShares,
|
||||
'filledShares',
|
||||
filledShares,
|
||||
'amount',
|
||||
betAmount,
|
||||
'matchedAmount',
|
||||
matchedAmount,
|
||||
'limitProb',
|
||||
limitProb
|
||||
)
|
||||
|
||||
const currentPayout = overallShares
|
||||
|
||||
const currentReturn = betAmount ? (currentPayout - betAmount) / betAmount : 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user