Remove console.logs

This commit is contained in:
James Grugett 2022-07-06 23:33:34 -05:00
parent 05a2ada858
commit d8202cb029
2 changed files with 0 additions and 52 deletions

View File

@ -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)

View File

@ -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