on master help sign in
invites: remove unused errorCount variable

We never add to the count, instead bailing out with an error as soon as we encounter problems generating invite wallets.

commit82af1413565f05839b2551cf5451c461cce4c5e5 authorFang <git@fang.io> dateTue 21 Jul 2020, 23:31 (6 years ago) parent5fc55cb
1 file changed−15
src/lib/useInviter.js−15
src/lib/useInviter.js−15
@@ -100,7 +100,6 @@ const useInviter = () => {
100100
101101 // NB(shrugs) - must be processed in serial because main thread, etc
102102 let signedInvites = [];
103− let errorCount = 0;
104103 for (let i = 0; i < numInvites; i++) {
105104 setProgress(x => x + 1);
106105 try {
@@ -195,20 +194,6 @@ const useInviter = () => {
195194 };
196195 }
197196
198− if (errorCount > 0) {
199− return {
200− errors: {
201− [WARNING]: `There ${pluralize(
202− errorCount,
203− 'was',
204− 'were'
205− )} ${pluralize(
206− errorCount,
207− 'error'
208− )} while generating wallets. You can still send the invites that generated correctly.`,
209− },
210− };
211− }
212197 return { invites: confirmedInvites };
213198 },
214199 [