From fdf123b875ac2cc40f816e5eadef43da28f86215 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Fri, 9 Sep 2022 14:26:23 -0700 Subject: [PATCH] Remove console.logs from common code This makes it easier to debug in local; we shouldn't be checking in console.log into the codebase, as a general rule --- common/payouts-dpm.ts | 44 ----------------------------------------- common/payouts-fixed.ts | 24 ---------------------- 2 files changed, 68 deletions(-) diff --git a/common/payouts-dpm.ts b/common/payouts-dpm.ts index 7d4a0185..bf6f5ebc 100644 --- a/common/payouts-dpm.ts +++ b/common/payouts-dpm.ts @@ -13,7 +13,6 @@ import { addObjects } from './util/object' export const getDpmCancelPayouts = (contract: DPMContract, bets: Bet[]) => { const { pool } = contract const poolTotal = sum(Object.values(pool)) - console.log('resolved N/A, pool M$', poolTotal) const betSum = sumBy(bets, (b) => b.amount) @@ -58,17 +57,6 @@ export const getDpmStandardPayouts = ( liquidityFee: 0, }) - console.log( - 'resolved', - outcome, - 'pool', - poolTotal, - 'profits', - profits, - 'creator fee', - creatorFee - ) - return { payouts: payouts.map(({ userId, payout }) => ({ userId, payout })), creatorPayout: creatorFee, @@ -110,17 +98,6 @@ export const getNumericDpmPayouts = ( liquidityFee: 0, }) - console.log( - 'resolved numeric bucket: ', - outcome, - 'pool', - poolTotal, - 'profits', - profits, - 'creator fee', - creatorFee - ) - return { payouts: payouts.map(({ userId, payout }) => ({ userId, payout })), creatorPayout: creatorFee, @@ -163,17 +140,6 @@ export const getDpmMktPayouts = ( liquidityFee: 0, }) - console.log( - 'resolved MKT', - p, - 'pool', - pool, - 'profits', - profits, - 'creator fee', - creatorFee - ) - return { payouts: payouts.map(({ userId, payout }) => ({ userId, payout })), creatorPayout: creatorFee, @@ -216,16 +182,6 @@ export const getPayoutsMultiOutcome = ( liquidityFee: 0, }) - console.log( - 'resolved', - resolutions, - 'pool', - poolTotal, - 'profits', - profits, - 'creator fee', - creatorFee - ) return { payouts: payouts.map(({ userId, payout }) => ({ userId, payout })), creatorPayout: creatorFee, diff --git a/common/payouts-fixed.ts b/common/payouts-fixed.ts index 4b8de85a..a8581ff6 100644 --- a/common/payouts-fixed.ts +++ b/common/payouts-fixed.ts @@ -43,18 +43,6 @@ export const getStandardFixedPayouts = ( const { collectedFees } = contract const creatorPayout = collectedFees.creatorFee - - console.log( - 'resolved', - outcome, - 'pool', - contract.pool[outcome], - 'payouts', - sum(payouts), - 'creator fee', - creatorPayout - ) - const liquidityPayouts = getLiquidityPoolPayouts( contract, outcome, @@ -98,18 +86,6 @@ export const getMktFixedPayouts = ( const { collectedFees } = contract const creatorPayout = collectedFees.creatorFee - - console.log( - 'resolved PROB', - p, - 'pool', - p * contract.pool.YES + (1 - p) * contract.pool.NO, - 'payouts', - sum(payouts), - 'creator fee', - creatorPayout - ) - const liquidityPayouts = getLiquidityPoolProbPayouts(contract, p, liquidities) return { payouts, creatorPayout, liquidityPayouts, collectedFees }