@@ -66,7 +66,7 @@ import timeout from 'lib/timeout';
66const INITIAL_VALUES = { emails: [''] };
66const INITIAL_VALUES = { emails: [''] };
68const GAS_LIMIT = GAS_LIMITS.GIFT_PLANET;
68const GAS_LIMIT = GAS_LIMITS.GIFT_PLANET;
69−// const HAS_RECEIVED_TEXT = 'This email has already received an invite.';
69+const HAS_RECEIVED_TEXT = 'This email has already received an invite.';
71const STATUS = {
71const STATUS = {
72 INPUT: 'INPUT',
72 INPUT: 'INPUT',
@@ -110,7 +110,7 @@ export default function InviteEmail() {
110 const { syncInvites, getInvites } = usePointCache();
110 const { syncInvites, getInvites } = usePointCache();
111 const { pointCursor } = usePointCursor();
111 const { pointCursor } = usePointCursor();
112 const point = need.point(pointCursor);
112 const point = need.point(pointCursor);
113− const { sendMail } = useMailer();
113+ const { getHasReceived, sendMail } = useMailer();
114 const { gasPrice } = useGasPrice();
114 const { gasPrice } = useGasPrice();
116 const cachedEmails = useRef({});
116 const cachedEmails = useRef({});
@@ -142,12 +142,15 @@ export default function InviteEmail() {
142 const isFailed = status === STATUS.FAILURE;
142 const isFailed = status === STATUS.FAILURE;
143 const isDone = status === STATUS.SUCCESS;
143 const isDone = status === STATUS.SUCCESS;
145− const validateHasReceived = useCallback(async email => {
145+ const validateHasReceived = useCallback(
146− // const hasReceived = await getHasReceived(email);
147+ const hasReceived = await getHasReceived(email);
147− // if (hasReceived) {
148+ if (hasReceived) {
148− // return HAS_RECEIVED_TEXT;
149+ return HAS_RECEIVED_TEXT;
152 const validateForm = useCallback((values, errors) => {
155 const validateForm = useCallback((values, errors) => {
153 if (hasErrors(errors)) {
156 if (hasErrors(errors)) {
@@ -381,13 +384,12 @@ export default function InviteEmail() {
386− clearReceipts,
388+ gasPrice,
388 addReceipt,
391 addReceipt,
389 sendMail,
392 sendMail,
393 const onSubmit = useCallback(
395 const onSubmit = useCallback(