@@ -159,7 +159,7 @@ const useInviter = () => {
159 () => setNeedFunds(undefined)
159 () => setNeedFunds(undefined)
162− let unsentInvites = [];
162+ let inviteErrors = [];
163 let confirmedInvites = [];
163 let confirmedInvites = [];
164 const txAndMailings = signedInvites.map(async invite => {
164 const txAndMailings = signedInvites.map(async invite => {
@@ -172,8 +172,12 @@ const useInviter = () => {
172 await waitForTransactionConfirm(_web3, txHash);
172 await waitForTransactionConfirm(_web3, txHash);
173 confirmedInvites.push(invite);
173 confirmedInvites.push(invite);
174 } catch (error) {
174 } catch (error) {
175− console.error(error);
175+ console.error('Error sending invite tx:', error);
176− unsentInvites.push(invite);
176+ if (typeof error === 'string') {
177+ inviteErrors.push(error);
178+ } else if (typeof error === 'object' && error.message) {
179+ inviteErrors.push(error.message);
@@ -183,8 +187,12 @@ const useInviter = () => {
183 setTxStatus(STATUS.SUCCESS);
187 setTxStatus(STATUS.SUCCESS);
184 setInvites(confirmedInvites);
188 setInvites(confirmedInvites);
186− if (unsentInvites.length > 0) {
190+ if (inviteErrors.length > 0) {
187− return { errors: { [FORM_ERROR]: unsentInvites } };
191+ return {
193+ [FORM_ERROR]: ['Error sending invites: ', ...inviteErrors],
190 if (errorCount > 0) {
198 if (errorCount > 0) {