Add newly created contributions to collection

This commit is contained in:
2019-05-23 12:48:18 +02:00
parent c30c6c2b36
commit af9951ca5a
+5 -1
View File
@@ -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;
});
},