@@ -4,7 +4,7 @@ import Maybe from 'folktale/maybe';
4import { hasReceived, sendMail } from './inviteMail';
4import { hasReceived, sendMail } from './inviteMail';
5import useSetState from './useSetState';
5import useSetState from './useSetState';
7−const kStubMailer = process.env.REACT_APP_STUB_MAILER === 'true';
7+const STUB_MAILER = process.env.REACT_APP_STUB_MAILER === 'true';
9function useHasReceivedCache() {
9function useHasReceivedCache() {
10 const [cache, addToCache] = useSetState();
10 const [cache, addToCache] = useSetState();
@@ -21,7 +21,7 @@ function useHasReceivedCache() {
24− if (kStubMailer) {
24+ if (STUB_MAILER) {
25 // always allow sending emails when stubbing
25 // always allow sending emails when stubbing
26 return addToCache({ [email]: Maybe.Just(false) });
26 return addToCache({ [email]: Maybe.Just(false) });
@@ -41,7 +41,7 @@ export default function useMailer(emails) {
41 // prefix to avoid clobbering sendMail import
41 // prefix to avoid clobbering sendMail import
42 // also throws if return value is false
42 // also throws if return value is false
43 const _sendMail = useCallback(async (email, ticket, rawTx) => {
43 const _sendMail = useCallback(async (email, ticket, rawTx) => {
44− if (kStubMailer) {
44+ if (STUB_MAILER) {
45 console.log(`${email} - ${ticket}`);
45 console.log(`${email} - ${ticket}`);