sendNewCommentEmail: handle sold shares for cfmm
This commit is contained in:
parent
8e514de28f
commit
d9ee03a96f
|
@ -48,8 +48,8 @@ export const sendMarketResolutionEmail = async (
|
||||||
creatorName: creator.name,
|
creatorName: creator.name,
|
||||||
question: contract.question,
|
question: contract.question,
|
||||||
outcome,
|
outcome,
|
||||||
investment: `${Math.round(investment)}`,
|
investment: `${Math.floor(investment)}`,
|
||||||
payout: `${Math.round(payout)}`,
|
payout: `${Math.floor(payout)}`,
|
||||||
url: `https://${DOMAIN}/${creator.username}/${contract.slug}`,
|
url: `https://${DOMAIN}/${creator.username}/${contract.slug}`,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,9 @@ export const sendNewCommentEmail = async (
|
||||||
let betDescription = ''
|
let betDescription = ''
|
||||||
if (bet) {
|
if (bet) {
|
||||||
const { amount, sale } = bet
|
const { amount, sale } = bet
|
||||||
betDescription = `${sale ? 'sold' : 'bought'} M$ ${Math.round(amount)}`
|
betDescription = `${sale || amount < 0 ? 'sold' : 'bought'} ${formatMoney(
|
||||||
|
amount
|
||||||
|
)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
const subject = `Comment on ${question}`
|
const subject = `Comment on ${question}`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user