diff --git a/www/app/controllers/account.js b/www/app/controllers/account.js index e8f7200..e40e564 100644 --- a/www/app/controllers/account.js +++ b/www/app/controllers/account.js @@ -1,8 +1,10 @@ import Ember from 'ember'; export default Ember.Controller.extend({ - applicationController: Ember.inject.controller('application'), - stats: Ember.computed.reads('applicationController.model.stats'), + applicationController: Ember.inject.controller('application'), + config: Ember.computed.reads('applicationController.config'), + stats: Ember.computed.reads('applicationController.model.stats'), + hashrate: Ember.computed.reads('applicationController.hashrate'), PersonalLuck: Ember.computed("stats", "model", { get() { @@ -26,5 +28,13 @@ export default Ember.Controller.extend({ } 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'); + } + }) + }); \ No newline at end of file diff --git a/www/app/templates/account.hbs b/www/app/templates/account.hbs index 9bca454..cfda837 100644 --- a/www/app/templates/account.hbs +++ b/www/app/templates/account.hbs @@ -23,6 +23,7 @@ {{/if}}