diff --git a/app/components/add-reimbursement/component.js b/app/components/add-reimbursement/component.js index 2d28c26..2bf8c74 100644 --- a/app/components/add-reimbursement/component.js +++ b/app/components/add-reimbursement/component.js @@ -107,6 +107,9 @@ export default class AddReimbursementComponent extends Component { @action submit (e) { e.preventDefault(); + if (!this.kredits.currentUser) { window.alert('You need to connect your Ethereum account first.'); return false } + if (!this.kredits.currentUserIsCore) { window.alert('Only core contributors can submit reimbursements.'); return false } + const contributor = this.contributors.findBy('id', this.contributorId); const attributes = { diff --git a/app/services/kredits.js b/app/services/kredits.js index 232f1f8..3755806 100644 --- a/app/services/kredits.js +++ b/app/services/kredits.js @@ -594,7 +594,10 @@ export default Service.extend({ // Listen to tx mining/execution status data.wait() .then(d => console.debug('[kredits] tx successful', d)) - .catch(e => console.log('[kredits] tx error', e)); + .catch(e => { + window.alert('The transaction failed to execute. Please check the browser console.'); + console.log('[kredits] tx error', e); + }); return reimbursement; });