From aeefb9be0caa2c2b4440fefec3ec9b36011ccaf3 Mon Sep 17 00:00:00 2001 From: jeje0106 <34496869+jeje0106@users.noreply.github.com> Date: Wed, 16 Aug 2023 20:34:33 +0200 Subject: [PATCH] Update account.js Calculation price token /usd --- www/app/controllers/account.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/www/app/controllers/account.js b/www/app/controllers/account.js index e40e564..b99bfdf 100644 --- a/www/app/controllers/account.js +++ b/www/app/controllers/account.js @@ -30,11 +30,25 @@ export default Ember.Controller.extend({ } }), - earnPerDay: Ember.computed('model', { + earnPerDayToken: Ember.computed('model', { get() { return 24 * 60 * 60 / this.get('applicationController.blockTime') * this.get('config').BlockReward * this.getWithDefault('model.hashrate') / this.get('hashrate'); } + }), + + earnPerDayUsd: Ember.computed('model', { + get() { + return 24 * 60 * 60 / this.get('applicationController.blockTime') * this.get('config').BlockReward * + this.getWithDefault('model.hashrate') / this.get('hashrate') * this.get ('model.exchangedata.price_usd'); + } + }), + + earnTotalPaid: Ember.computed('model', { + get() { + return 1 * this.get ('model.exchangedata.price_usd') * this.get ('model.stats.paid'); + } }) + -}); \ No newline at end of file +});