|
|
|
@ -2,7 +2,9 @@ import Ember from 'ember'; |
|
|
|
|
|
|
|
|
|
|
|
export default Ember.Controller.extend({ |
|
|
|
export default Ember.Controller.extend({ |
|
|
|
applicationController: Ember.inject.controller('application'), |
|
|
|
applicationController: Ember.inject.controller('application'), |
|
|
|
|
|
|
|
config: Ember.computed.reads('applicationController.config'), |
|
|
|
stats: Ember.computed.reads('applicationController.model.stats'), |
|
|
|
stats: Ember.computed.reads('applicationController.model.stats'), |
|
|
|
|
|
|
|
hashrate: Ember.computed.reads('applicationController.hashrate'), |
|
|
|
|
|
|
|
|
|
|
|
PersonalLuck: Ember.computed("stats", "model", { |
|
|
|
PersonalLuck: Ember.computed("stats", "model", { |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
@ -26,5 +28,13 @@ export default Ember.Controller.extend({ |
|
|
|
} |
|
|
|
} |
|
|
|
return percent; |
|
|
|
return percent; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
earnPerDay: Ember.computed('model', { |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return 24 * 60 * 60 / this.get('applicationController.blockTime') * this.get('config').BlockReward * |
|
|
|
|
|
|
|
this.getWithDefault('model.hashrate') / this.get('hashrate'); |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |