Don't include loans in email payout message
This commit is contained in:
parent
903fcc83b3
commit
47eb8abed0
|
@ -171,12 +171,12 @@ export const resolveMarket = async (
|
||||||
const openBets = bets.filter((b) => !b.isSold && !b.sale)
|
const openBets = bets.filter((b) => !b.isSold && !b.sale)
|
||||||
const loanPayouts = getLoanPayouts(openBets)
|
const loanPayouts = getLoanPayouts(openBets)
|
||||||
|
|
||||||
const payouts = [
|
const payoutsWithoutLoans = [
|
||||||
{ userId: creatorId, payout: creatorPayout, deposit: creatorPayout },
|
{ userId: creatorId, payout: creatorPayout, deposit: creatorPayout },
|
||||||
...liquidityPayouts.map((p) => ({ ...p, deposit: p.payout })),
|
...liquidityPayouts.map((p) => ({ ...p, deposit: p.payout })),
|
||||||
...traderPayouts,
|
...traderPayouts,
|
||||||
...loanPayouts,
|
|
||||||
]
|
]
|
||||||
|
const payouts = [...payoutsWithoutLoans, ...loanPayouts]
|
||||||
|
|
||||||
if (!isProd())
|
if (!isProd())
|
||||||
console.log(
|
console.log(
|
||||||
|
@ -208,7 +208,7 @@ export const resolveMarket = async (
|
||||||
await undoUniqueBettorRewardsIfCancelResolution(contract, outcome)
|
await undoUniqueBettorRewardsIfCancelResolution(contract, outcome)
|
||||||
await revalidateStaticProps(getContractPath(contract))
|
await revalidateStaticProps(getContractPath(contract))
|
||||||
|
|
||||||
const userPayoutsWithoutLoans = groupPayoutsByUser(payouts)
|
const userPayoutsWithoutLoans = groupPayoutsByUser(payoutsWithoutLoans)
|
||||||
|
|
||||||
const userInvestments = mapValues(
|
const userInvestments = mapValues(
|
||||||
groupBy(bets, (bet) => bet.userId),
|
groupBy(bets, (bet) => bet.userId),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user