From 4ab5c3c3725745d495fe54cdfd261216d5980d70 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Fri, 9 Oct 2020 14:29:53 +0200 Subject: [PATCH] Listen to tx status of submitted reimbursements --- app/services/kredits.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/services/kredits.js b/app/services/kredits.js index a2a98d5..232f1f8 100644 --- a/app/services/kredits.js +++ b/app/services/kredits.js @@ -590,6 +590,12 @@ export default Service.extend({ confirmedAt: this.currentBlock + 40320 }); this.reimbursements.pushObject(reimbursement); + + // Listen to tx mining/execution status + data.wait() + .then(d => console.debug('[kredits] tx successful', d)) + .catch(e => console.log('[kredits] tx error', e)); + return reimbursement; }); },