Fix reimbursement handling after creation
This commit is contained in:
@@ -583,11 +583,11 @@ export default Service.extend({
|
|||||||
return this.kredits.Reimbursement.add(attributes, { gasLimit: 300000 })
|
return this.kredits.Reimbursement.add(attributes, { gasLimit: 300000 })
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.debug('[kredits] add reimbursement response', data);
|
console.debug('[kredits] add reimbursement response', data);
|
||||||
const reimbursement = Reimbursement.create(processReimbursementData(data));
|
const reimbursement = Reimbursement.create(attributes);
|
||||||
reimbursement.setProperties({
|
reimbursement.setProperties({
|
||||||
contributor: this.contributors.findBy('id', attributes.contributorId),
|
contributor: this.contributors.findBy('id', attributes.contributorId.toString()),
|
||||||
pendingTx: data,
|
pendingTx: data,
|
||||||
confirmedAtBlock: this.currentBlock + 40320
|
confirmedAt: this.currentBlock + 40320
|
||||||
});
|
});
|
||||||
this.reimbursements.pushObject(reimbursement);
|
this.reimbursements.pushObject(reimbursement);
|
||||||
return reimbursement;
|
return reimbursement;
|
||||||
|
|||||||
Reference in New Issue
Block a user