load data from ethereum contract
This commit is contained in:
@@ -11,15 +11,4 @@ export default Ember.Controller.extend({
|
||||
|
||||
kredits: service(),
|
||||
|
||||
contributorsCount: computed('model.contributors.[]', function() {
|
||||
return this.get('model.contributors').length;
|
||||
}),
|
||||
|
||||
kreditsSum: computed('model.contributors.[]', function() {
|
||||
let kredits = this.get('model.contributors').mapBy('kredits');
|
||||
return kredits.reduce(function(previousValue, currentValue) {
|
||||
return currentValue + previousValue;
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user