Skip to content

Commit

Permalink
feat(starbase): swap app name in otp email subject
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosmin-Parvulescu committed Jun 7, 2023
1 parent 9b25567 commit e1c66e9
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions platform/email/emailOtpTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,18 @@ export type EmailTemplateParams = {
contactURL?: string
termsURL: string
privacyURL: string
appName: string
}

export const EmailTemplate = (
passcode: string,
params: EmailTemplateParams
): EmailContent => {
const { logoURL, address, contactURL, termsURL, privacyURL } = params
const { logoURL, address, contactURL, termsURL, privacyURL, appName } = params

return {
contentType: 'text/html',
subject: `Your Rollup ID one-time passcode`,
subject: `Your ${appName ?? `Rollup ID`} one-time passcode`,
body: `<!DOCTYPE html>
<html>
<head>
Expand Down Expand Up @@ -192,9 +193,8 @@ export const EmailTemplate = (
rel="noreferrer"
>Privacy Policy</a
>
${
contactURL && contactURL !== ''
? `
${contactURL && contactURL !== ''
? `
<div class="vl"></div>
<a
class="footer-links"
Expand All @@ -203,13 +203,12 @@ export const EmailTemplate = (
rel="noreferrer"
>Contact Us</a
>`
: ''
}
: ''
}
</div>
${
address && address !== ''
? `
${address && address !== ''
? `
<pre
style="
font-size: 12px;
Expand All @@ -219,8 +218,8 @@ export const EmailTemplate = (
margin-top: 10px;
"
>${address}</pre>`
: ''
}
: ''
}
<p
style="
font-size: 12px;
Expand Down

0 comments on commit e1c66e9

Please sign in to comment.