@@ -187,6 +187,27 @@ export default function InviteEmail() {
187187 throw new Error('Internal Error: Missing Contracts/Web3/Wallet');
188188 }
189189
190+ //TODO want to do this on-input, but that gets weird. see #188
191+ let errorCount = 0;
192+ const mailsVerified = inputs.map(async input => {
193+ console.log('aaa', invites);
194+ const email = input.data;
195+ const hasReceived = getHasReceived(email).matchWith({
196+ Nothing: () => false, // loading
197+ Just: p => p.value,
198+ });
199+ if (hasReceived) {
200+ errorCount++;
201+ addError({
202+ [input.name]: `${email} has already received an invite.`,
203+ });
204+ }
205+ });
206+ await Promise.all(mailsVerified);
207+ if (errorCount > 0) {
208+ throw new Error(`Some of these already have a point!`);
209+ }
210+
190211 const nonce = await _web3.eth.getTransactionCount(_wallet.address);
191212 const chainId = await _web3.eth.net.getId();
192213 const planets = await azimuth.delegatedSending.getPlanetsToSend(
@@ -207,7 +228,6 @@ export default function InviteEmail() {
207228 );
208229 }
209230
210− let errorCount = 0;
211231 clearInvites();
212232 // NB(shrugs) - must be processed in serial because main thread, etc
213233 for (let i = 0; i < inputs.length; i++) {