From af9951ca5ab2583c99904270ff7626cc72613029 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 23 May 2019 12:48:18 +0200 Subject: [PATCH] Add newly created contributions to collection --- app/services/kredits.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/services/kredits.js b/app/services/kredits.js index fcfbf71..58996b6 100644 --- a/app/services/kredits.js +++ b/app/services/kredits.js @@ -210,7 +210,11 @@ export default Service.extend({ .then(data => { console.debug('[kredits] add contribution response', data); attributes.contributor = this.contributors.findBy('id', attributes.contributorId); - return Contribution.create(attributes); + const contribution = Contribution.create(attributes); + // TODO receive from wrapper + contribution.set('confirmedAtBlock', data.blockNumber + 40320); + this.contributions.pushObject(contribution); + return contribution; }); },