on master help sign in
revert comment out mailcode
commitc10a8abf6b1f24f0dc687c9c99884dcfeea964a7 authorAnthony Arroyo <anthony@tlon.io> dateWed 16 Oct 2019, 20:01 (7 years ago) parentcfd27b1
1 file changed+20−17
src/views/Invite/InviteEmail.js+20−17
src/views/Invite/InviteEmail.js+20−17
@@ -140,12 +140,15 @@ export default function InviteEmail() {
140140 const isFailed = status === STATUS.FAILURE;
141141 const isDone = status === STATUS.SUCCESS;
142142
143− const validateHasReceived = useCallback(async email => {
144− //const hasReceived = await getHasReceived(email);
145− //if (hasReceived) {
146− // return HAS_RECEIVED_TEXT;
147− //}
148− }, []);
143+ const validateHasReceived = useCallback(
144+ async email => {
145+ const hasReceived = await getHasReceived(email);
146+ if (hasReceived) {
147+ return HAS_RECEIVED_TEXT;
148+ }
149+ },
150+ [getHasReceived]
151+ );
149152
150153 const validateForm = useCallback((values, errors) => {
151154 if (hasErrors(errors)) {
@@ -339,17 +342,17 @@ export default function InviteEmail() {
339342 return;
340343 }
341344
342− //try {
343− // await sendMail(
344− // invite.email,
345− // invite.ticket,
346− // ob.patp(point),
347− // invite.rawTx
348− // );
349− //} catch (error) {
350− // console.error(error);
351− orphanedInvites.push(invite);
352− //}
345+ try {
346+ await sendMail(
347+ invite.email,
348+ invite.ticket,
349+ ob.patp(point),
350+ invite.rawTx
351+ );
352+ } catch (error) {
353+ console.error(error);
354+ orphanedInvites.push(invite);
355+ }
353356
354357 addReceipt({ [name]: true });
355358 });