diff --git a/functions/src/email-templates/market-resolved-no-bets.html b/functions/src/email-templates/market-resolved-no-bets.html
new file mode 100644
index 00000000..ff5f541f
--- /dev/null
+++ b/functions/src/email-templates/market-resolved-no-bets.html
@@ -0,0 +1,491 @@
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ {{creatorName}} asked
+ |
+
+
+
+
+ {{question}}
+ |
+
+
+
+
+ Resolved {{outcome}}
+
+ |
+
+
+
+
+
+
+ Dear {{name}},
+
+
+ A market you were following has been resolved!
+
+
+ Thanks,
+
+ Manifold Team
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+ |
+
+
+
+
+
\ No newline at end of file
diff --git a/functions/src/emails.ts b/functions/src/emails.ts
index b9d34363..d1387ef9 100644
--- a/functions/src/emails.ts
+++ b/functions/src/emails.ts
@@ -56,10 +56,9 @@ export const sendMarketResolutionEmail = async (
? ` (plus ${formatMoney(creatorPayout)} in commissions)`
: ''
- const displayedInvestment =
- Number.isNaN(investment) || investment < 0
- ? formatMoney(0)
- : formatMoney(investment)
+ const correctedInvestment =
+ Number.isNaN(investment) || investment < 0 ? 0 : investment
+ const displayedInvestment = formatMoney(correctedInvestment)
const displayedPayout = formatMoney(payout)
@@ -81,7 +80,7 @@ export const sendMarketResolutionEmail = async (
return await sendTemplateEmail(
privateUser.email,
subject,
- 'market-resolved',
+ correctedInvestment === 0 ? 'market-resolved-no-bets' : 'market-resolved',
templateData
)
}