diff --git a/cronjobs/pplns_payout.php b/cronjobs/pplns_payout.php index 093be4ce..832f6e59 100755 --- a/cronjobs/pplns_payout.php +++ b/cronjobs/pplns_payout.php @@ -38,6 +38,10 @@ if (empty($aAllBlocks)) { $monitoring->endCronjob($cron_name, 'E0011', 0, true, false); } +// Fetch precision +$precision = $coin->getCoinValuePrevision(); +$table_precision = $coin->getCoinValuePrevision() + 3; + $log->logDebug('Starting PPLNS payout process'); $count = 0; foreach ($aAllBlocks as $iIndex => $aBlock) { @@ -181,7 +185,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) { } // Table header for account shares - $strLogMask = "| %5.5s | %-15.15s | %15.15s | %15.15s | %12.12s | %15.15s | %15.15s | %15.15s | %15.15s |"; + $strLogMask = "| %5.5s | %-15.15s | %15.15s | %15.15s | %12.12s | %${table_precision}.${table_precision}s | %${table_precision}.${table_precision}s | %${table_precision}.${table_precision}s | %${table_precision}.${table_precision}s |"; $log->logInfo(sprintf($strLogMask, 'ID', 'Username', 'Valid', 'Invalid', 'Percentage', 'Payout', 'Donation', 'Fee', 'Bonus')); // Loop through all accounts that have found shares for this round @@ -197,7 +201,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) { // Payout based on PPLNS target shares, proportional payout for all users $aData['percentage'] = round(( 100 / $iRoundShares) * $aData['pplns_valid'], 8); - $aData['payout'] = round(( $aData['percentage'] / 100 ) * $dReward, 8); + $aData['payout'] = ( $aData['percentage'] / 100 ) * $dReward; // Defaults $aData['fee' ] = 0; $aData['donation'] = 0; @@ -205,19 +209,19 @@ foreach ($aAllBlocks as $iIndex => $aBlock) { // Calculate pool fees if ($config['fees'] > 0 && $aData['no_fees'] == 0) - $aData['fee'] = round($config['fees'] / 100 * $aData['payout'], 8); + $aData['fee'] = $config['fees'] / 100 * $aData['payout']; // Calculate pool bonus if it applies, will be paid from liquid assets! if ($config['pool_bonus'] > 0) { if ($config['pool_bonus_type'] == 'block') { - $aData['pool_bonus'] = round(( $config['pool_bonus'] / 100 ) * $dReward, 8); + $aData['pool_bonus'] = ( $config['pool_bonus'] / 100 ) * $dReward; } else { - $aData['pool_bonus'] = round(( $config['pool_bonus'] / 100 ) * $aData['payout'], 8); + $aData['pool_bonus'] = ( $config['pool_bonus'] / 100 ) * $aData['payout']; } } // Calculate donation amount, fees not included - $aData['donation'] = round($user->getDonatePercent($user->getUserId($aData['username'])) / 100 * ( $aData['payout'] - $aData['fee']), 8); + $aData['donation'] = $user->getDonatePercent($user->getUserId($aData['username'])) / 100 * ( $aData['payout'] - $aData['fee']); // Verbose output of this users calculations $log->logInfo( diff --git a/cronjobs/pps_payout.php b/cronjobs/pps_payout.php index 509176d2..f35f1560 100755 --- a/cronjobs/pps_payout.php +++ b/cronjobs/pps_payout.php @@ -63,7 +63,7 @@ if ($config['pps']['reward']['type'] == 'blockavg' && $block->getBlockCount() > } // Per-share value to be paid out to users -$pps_value = round($coin->calcPPSValue($pps_reward, $dDifficulty), 12); +$pps_value = $coin->calcPPSValue($pps_reward, $dDifficulty); // Find our last share accounted and last inserted share for PPS calculations if (!$iPreviousShareId = $setting->getValue('pps_last_share_id')) { @@ -89,13 +89,15 @@ $log->logInfo("\tQuery Completed..."); if (!empty($aAccountShares)) { // Runtime information for this payout + $precision = $coin->getCoinValuePrevision(); + $table_precision = $coin->getCoinValuePrevision() + 3; $log->logInfo('Runtime information for this payout'); - $strLogMask = "| %-15.15s | %15.15s | %15.15s | %15.15s |"; - $log->logInfo(sprintf($strLogMask, 'PPS reward type', 'Reward Base', 'Difficulty', 'PPS Value')); - $log->logInfo(sprintf($strLogMask, $strRewardType, $pps_reward, $dDifficulty, $pps_value)); + $strLogMask = "| %-15.15s | %15.15s | %15.15s | %${table_precision}.${table_precision}s | %3.3s |"; + $log->logInfo(sprintf($strLogMask, 'PPS reward type', 'Reward Base', 'Difficulty', 'PPS Value', 'Precision')); + $log->logInfo(sprintf($strLogMask, $strRewardType, $pps_reward, $dDifficulty, $pps_value, $precision)); $log->logInfo('Per-user payout information'); - $strLogMask = "| %8.8s | %25.25s | %15.15s | %15.15s | %18.18s | %18.18s | %18.18s |"; - $log->logInfo(sprintf($strLogMask, 'User ID', 'Username', 'Invalid', 'Valid', ' * PPS Value', ' = Payout', 'Donation', 'Fee')); + $strLogMask = "| %8.8s | %25.25s | %15.15s | %${table_precision}.${table_precision}s | %${table_precision}.${table_precision}s | %${table_precision}.${table_precision}s | %${table_precision}.${table_precision}s |"; + $log->logInfo(sprintf($strLogMask, 'User ID', 'Username', 'Invalid', 'Valid', '* PPS Value', ' = Payout', 'Donation', 'Fee')); } foreach ($aAccountShares as $aData) { @@ -106,7 +108,7 @@ foreach ($aAccountShares as $aData) { } // Payout for this user - $aData['payout'] = round($aData['valid'] * $pps_value, 12); + $aData['payout'] = $aData['valid'] * $pps_value; // Defaults $aData['fee' ] = 0; @@ -114,13 +116,13 @@ foreach ($aAccountShares as $aData) { // Calculate block fees if ($config['fees'] > 0 && $aData['no_fees'] == 0) - $aData['fee'] = round($config['fees'] / 100 * $aData['payout'], 12); + $aData['fee'] = $config['fees'] / 100 * $aData['payout']; // Calculate donation amount - $aData['donation'] = round($user->getDonatePercent($user->getUserId($aData['username'])) / 100 * ( $aData['payout'] - $aData['fee']), 12); + $aData['donation'] = $user->getDonatePercent($user->getUserId($aData['username'])) / 100 * ( $aData['payout'] - $aData['fee']); $log->logInfo(sprintf( $strLogMask, $aData['id'], $aData['username'], $aData['invalid'], $aData['valid'], - number_format($pps_value, 12), number_format($aData['payout'], 12), number_format($aData['donation'], 12), number_format($aData['fee'], 12) + number_format($pps_value, $precision), number_format($aData['payout'], $precision), number_format($aData['donation'], $precision), number_format($aData['fee'], $precision) )); // Add new credit transaction diff --git a/cronjobs/proportional_payout.php b/cronjobs/proportional_payout.php index 58f47ee9..faf4e53a 100755 --- a/cronjobs/proportional_payout.php +++ b/cronjobs/proportional_payout.php @@ -38,9 +38,13 @@ if (empty($aAllBlocks)) { $monitoring->endCronjob($cron_name, 'E0011', 0, true, false); } +// Fetch precision +$precision = $coin->getCoinValuePrevision(); +$table_precision = $coin->getCoinValuePrevision() + 3; + $count = 0; // Table header for account shares -$strLogMask = "| %10.10s | %-5.5s | %15.15s | %15.15s | %12.12s | %12.12s | %15.15s | %15.15s | %15.15s | %15.15s |"; +$strLogMask = "| %10.10s | %-5.5s | %15.15s | %15.15s | %12.12s | %12.12s | %${table_precision}.${table_precision}s | %${table_precision}.${table_precision}s | %${table_precision}.${table_precision}s | %${table_precision}.${table_precision}s |"; $log->logInfo(sprintf($strLogMask, 'Block', 'ID', 'Username', 'Valid', 'Invalid', 'Percentage', 'Payout', 'Donation', 'Fee', 'Bonus')); foreach ($aAllBlocks as $iIndex => $aBlock) { // If we have unaccounted blocks without share_ids, they might not have been inserted yet @@ -87,29 +91,29 @@ foreach ($aAllBlocks as $iIndex => $aBlock) { $aData['fee' ] = 0; $aData['donation'] = 0; $aData['pool_bonus'] = 0; - $aData['percentage'] = round(( 100 / $iRoundShares ) * $aData['valid'], 8); - $aData['payout'] = round(( $aData['percentage'] / 100 ) * $dReward, 8); + $aData['percentage'] = ( 100 / $iRoundShares ) * $aData['valid']; + $aData['payout'] = ( $aData['percentage'] / 100 ) * $dReward; // Calculate pool fees if they apply if ($config['fees'] > 0 && $aData['no_fees'] == 0) - $aData['fee'] = round($config['fees'] / 100 * $aData['payout'], 8); + $aData['fee'] = $config['fees'] / 100 * $aData['payout']; // Calculate pool bonus if it applies, will be paid from liquid assets! if ($config['pool_bonus'] > 0) { if ($config['pool_bonus_type'] == 'block') { - $aData['pool_bonus'] = round(( $config['pool_bonus'] / 100 ) * $dReward, 8); + $aData['pool_bonus'] = ( $config['pool_bonus'] / 100 ) * $dReward; } else { - $aData['pool_bonus'] = round(( $config['pool_bonus'] / 100 ) * $aData['payout'], 8); + $aData['pool_bonus'] = ( $config['pool_bonus'] / 100 ) * $aData['payout']; } } // Calculate donation amount, fees not included - $aData['donation'] = round($user->getDonatePercent($user->getUserId($aData['username'])) / 100 * ( $aData['payout'] - $aData['fee']), 8); + $aData['donation'] = $user->getDonatePercent($user->getUserId($aData['username'])) / 100 * ( $aData['payout'] - $aData['fee']); // Verbose output of this users calculations $log->logInfo( sprintf($strLogMask, $aBlock['height'], $aData['id'], $aData['username'], $aData['valid'], $aData['invalid'], - number_format($aData['percentage'], 8), number_format($aData['payout'], 8), number_format($aData['donation'], 8), number_format($aData['fee'], 8), number_format($aData['pool_bonus'], 8)) + number_format($aData['percentage'], $precision), number_format($aData['payout'], $precision), number_format($aData['donation'], $precision), number_format($aData['fee'], $precision), number_format($aData['pool_bonus'], $precision)) ); // Update user share statistics diff --git a/include/classes/coins/coin_base.class.php b/include/classes/coins/coin_base.class.php index b9242822..ab84c311 100644 --- a/include/classes/coins/coin_base.class.php +++ b/include/classes/coins/coin_base.class.php @@ -15,6 +15,9 @@ class CoinBase extends Base { // Our coins share difficulty precision protected $share_difficulty_precision = 0; + // Our coin value precision, mostly used on frontend + protected $coin_value_precision = 8; + /** * Read our target bits **/ @@ -22,6 +25,13 @@ class CoinBase extends Base { return $this->target_bits; } + /** + * Read our coin value precision + **/ + public function getCoinValuePrevision() { + return $this->coin_value_precision; + } + /** * Read our share difficulty precision **/ diff --git a/include/classes/coins/coin_sha256d.class.php b/include/classes/coins/coin_sha256d.class.php index 1147770e..2b830263 100644 --- a/include/classes/coins/coin_sha256d.class.php +++ b/include/classes/coins/coin_sha256d.class.php @@ -8,6 +8,7 @@ $defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1; **/ class Coin extends CoinBase { protected $target_bits = 32; + protected $coin_value_precision = 20; } ?> diff --git a/include/classes/transaction.class.php b/include/classes/transaction.class.php index 8920419b..194ca486 100644 --- a/include/classes/transaction.class.php +++ b/include/classes/transaction.class.php @@ -16,8 +16,9 @@ class Transaction extends Base { * @return bool **/ public function addTransaction($account_id, $amount, $type='Credit', $block_id=NULL, $coin_address=NULL, $txid=NULL) { + $amount = number_format($amount, $this->coin->getCoinValuePrevision(), '.', ''); $stmt = $this->mysqli->prepare("INSERT INTO $this->table (account_id, amount, block_id, type, coin_address, txid) VALUES (?, ?, ?, ?, ?, ?)"); - if ($this->checkStmt($stmt) && $stmt->bind_param("idisss", $account_id, $amount, $block_id, $type, $coin_address, $txid) && $stmt->execute()) { + if ($this->checkStmt($stmt) && $stmt->bind_param("isisss", $account_id, $amount, $block_id, $type, $coin_address, $txid) && $stmt->execute()) { $this->insert_id = $stmt->insert_id; return true; } @@ -296,11 +297,11 @@ class Transaction extends Base { $this->debug->append("STA " . __METHOD__, 4); $stmt = $this->mysqli->prepare(" SELECT - ROUND(( + ( SUM( IF( ( t.type IN ('Credit','Bonus') AND b.confirmations >= ? ) OR t.type = 'Credit_PPS', t.amount, 0 ) ) - SUM( IF( t.type IN ('Debit_MP', 'Debit_AP'), t.amount, 0 ) ) - SUM( IF( ( t.type IN ('Donation','Fee') AND b.confirmations >= ? ) OR ( t.type IN ('Donation_PPS', 'Fee_PPS', 'TXFee') ), t.amount, 0 ) ) - ), 8) AS balance + ) AS balance FROM $this->table AS t LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id @@ -319,19 +320,19 @@ class Transaction extends Base { $this->debug->append("STA " . __METHOD__, 4); $stmt = $this->mysqli->prepare(" SELECT - IFNULL(ROUND(( + IFNULL(( SUM( IF( ( t.type IN ('Credit','Bonus') AND b.confirmations >= ? ) OR t.type = 'Credit_PPS', t.amount, 0 ) ) - SUM( IF( t.type IN ('Debit_MP', 'Debit_AP'), t.amount, 0 ) ) - SUM( IF( ( t.type IN ('Donation','Fee') AND b.confirmations >= ? ) OR ( t.type IN ('Donation_PPS', 'Fee_PPS', 'TXFee') ), t.amount, 0 ) ) - ), 8), 0) AS confirmed, - IFNULL(ROUND(( + ), 0) AS confirmed, + IFNULL(( SUM( IF( t.type IN ('Credit','Bonus') AND b.confirmations < ? AND b.confirmations >= 0, t.amount, 0 ) ) - SUM( IF( t.type IN ('Donation','Fee') AND b.confirmations < ? AND b.confirmations >= 0, t.amount, 0 ) ) - ), 8), 0) AS unconfirmed, - IFNULL(ROUND(( + ), 0) AS unconfirmed, + IFNULL(( SUM( IF( t.type IN ('Credit','Bonus') AND b.confirmations = -1, t.amount, 0) ) - SUM( IF( t.type IN ('Donation','Fee') AND b.confirmations = -1, t.amount, 0) ) - ), 8), 0) AS orphaned + ), 0) AS orphaned FROM $this->table AS t LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id @@ -357,12 +358,10 @@ class Transaction extends Base { a.ap_threshold, ca.coin_address, IFNULL( - ROUND( ( SUM( IF( ( t.type IN ('Credit','Bonus') AND b.confirmations >= " . $this->config['confirmations'] . ") OR t.type = 'Credit_PPS', t.amount, 0 ) ) - SUM( IF( t.type IN ('Debit_MP', 'Debit_AP'), t.amount, 0 ) ) - SUM( IF( ( t.type IN ('Donation','Fee') AND b.confirmations >= " . $this->config['confirmations'] . ") OR ( t.type IN ('Donation_PPS', 'Fee_PPS', 'TXFee') ), t.amount, 0 ) ) - ), 8 ), 0 ) AS confirmed FROM $this->table AS t @@ -451,12 +450,10 @@ class Transaction extends Base { ca.coin_address, p.id AS payout_id, IFNULL( - ROUND( ( SUM( IF( ( t.type IN ('Credit','Bonus') AND b.confirmations >= " . $this->config['confirmations'] . ") OR t.type = 'Credit_PPS', t.amount, 0 ) ) - SUM( IF( t.type IN ('Debit_MP', 'Debit_AP'), t.amount, 0 ) ) - SUM( IF( ( t.type IN ('Donation','Fee') AND b.confirmations >= " . $this->config['confirmations'] . ") OR ( t.type IN ('Donation_PPS', 'Fee_PPS', 'TXFee') ), t.amount, 0 ) ) - ), 8 ), 0 ) AS confirmed FROM " . $this->payout->getTableName() . " AS p @@ -481,7 +478,9 @@ class Transaction extends Base { $transaction = new Transaction(); $transaction->setMemcache($memcache); $transaction->setNotification($notification); +$transaction->setSetting($setting); $transaction->setDebug($debug); +$transaction->setCoin($coin); $transaction->setCoinAddress($coin_address); $transaction->setMysql($mysqli); $transaction->setConfig($config); diff --git a/include/config/admin_settings.inc.php b/include/config/admin_settings.inc.php index 3c0b525d..8a5c5ee2 100644 --- a/include/config/admin_settings.inc.php +++ b/include/config/admin_settings.inc.php @@ -324,7 +324,7 @@ $aSettings['system'][] = array( ); $aSettings['system'][] = array( 'display' => 'Date format string', 'type' => 'text', - 'site' => 25, + 'size' => 25, 'default' => '%m/%d/%Y %H:%M:%S', 'name' => 'system_date_format', 'value' => $setting->getValue('system_date_format'), 'tooltip' => 'Date format to be used throughout the site. Please check PHP strftime for details.' diff --git a/include/pages/dashboard.inc.php b/include/pages/dashboard.inc.php index b21b7b11..01598da6 100644 --- a/include/pages/dashboard.inc.php +++ b/include/pages/dashboard.inc.php @@ -49,6 +49,7 @@ if ($user->isAuthenticated()) { } // Make it available in Smarty + $smarty->assign('PRECISION', $coin->getCoinValuePrevision()); $smarty->assign('BLOCKSFOUND', $aLastBlocks); $smarty->assign('DISABLED_DASHBOARD', $setting->getValue('disable_dashboard')); $smarty->assign('DISABLED_DASHBOARD_API', $setting->getValue('disable_dashboard_api')); diff --git a/include/smarty_globals.inc.php b/include/smarty_globals.inc.php index f8549287..8cd45a77 100644 --- a/include/smarty_globals.inc.php +++ b/include/smarty_globals.inc.php @@ -176,7 +176,8 @@ if (@$_SESSION['USERDATA']['id']) { break; case 'pps': $aGlobal['userdata']['pps']['unpaidshares'] = $statistics->getUserUnpaidPPSShares($_SESSION['USERDATA']['username'], $_SESSION['USERDATA']['id'], $setting->getValue('pps_last_share_id')); - $aGlobal['ppsvalue'] = number_format($statistics->getPPSValue(), 12); + // We use coin precision + 8 to display PPS value + $aGlobal['ppsvalue'] = number_format($statistics->getPPSValue(), $coin->getCoinValuePrevision() + 8); $aGlobal['poolppsvalue'] = $aGlobal['ppsvalue'] * pow(2, $config['difficulty'] - 16); $aGlobal['userdata']['estimates'] = $statistics->getUserEstimates($aGlobal['userdata']['sharerate'], $aGlobal['userdata']['sharedifficulty'], $aGlobal['userdata']['donate_percent'], $aGlobal['userdata']['no_fees'], $aGlobal['ppsvalue']); break; diff --git a/include/version.inc.php b/include/version.inc.php index 46e122fb..1007908c 100644 --- a/include/version.inc.php +++ b/include/version.inc.php @@ -2,7 +2,7 @@ $defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1; define('MPOS_VERSION', '0.0.4'); -define('DB_VERSION', '0.0.14'); +define('DB_VERSION', '0.0.15'); define('CONFIG_VERSION', '0.0.8'); define('HASH_VERSION', 1); diff --git a/sql/000_base_structure.sql b/sql/000_base_structure.sql index 78d65ce8..aeed52f6 100644 --- a/sql/000_base_structure.sql +++ b/sql/000_base_structure.sql @@ -144,7 +144,7 @@ CREATE TABLE IF NOT EXISTS `settings` ( UNIQUE KEY `setting` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO `settings` (`name`, `value`) VALUES ('DB_VERSION', '0.0.14'); +INSERT INTO `settings` (`name`, `value`) VALUES ('DB_VERSION', '0.0.15'); CREATE TABLE IF NOT EXISTS `shares` ( `id` bigint(30) NOT NULL AUTO_INCREMENT, @@ -226,7 +226,7 @@ CREATE TABLE IF NOT EXISTS `transactions` ( `account_id` int(255) unsigned NOT NULL, `type` varchar(25) DEFAULT NULL, `coin_address` varchar(255) DEFAULT NULL, - `amount` double DEFAULT '0', + `amount` decimal(50,30) DEFAULT '0', `block_id` int(255) DEFAULT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `txid` varchar(256) DEFAULT NULL, diff --git a/templates/bootstrap/dashboard/js/api.tpl b/templates/bootstrap/dashboard/js/api.tpl index d47278f3..ddf3d150 100644 --- a/templates/bootstrap/dashboard/js/api.tpl +++ b/templates/bootstrap/dashboard/js/api.tpl @@ -134,18 +134,18 @@ $(document).ready(function(){ $('#b-nblock').html(data.getdashboarddata.data.network.block); $('#b-roundprogress').html(number_format(parseFloat(data.getdashboarddata.data.pool.shares.progress).toFixed(2), 2) + "%"); {/literal}{if $GLOBAL.config.payout_system != 'pps'}{literal } - $('#b-payout').html(number_format(data.getdashboarddata.data.personal.estimates.payout, 8)); - $('#b-block').html(number_format(data.getdashboarddata.data.personal.estimates.block, 8)); - $('#b-fee').html(number_format(data.getdashboarddata.data.personal.estimates.fee,8 )); - $('#b-donation').html(number_format(data.getdashboarddata.data.personal.estimates.donation, 8)); + $('#b-payout').html(number_format(data.getdashboarddata.data.personal.estimates.payout, {/literal}{$PRECISION}{literal})); + $('#b-block').html(number_format(data.getdashboarddata.data.personal.estimates.block, {/literal}{$PRECISION}{literal})); + $('#b-fee').html(number_format(data.getdashboarddata.data.personal.estimates.fee, {/literal}{$PRECISION}{literal})); + $('#b-donation').html(number_format(data.getdashboarddata.data.personal.estimates.donation, {/literal}{$PRECISION}{literal})); {/literal}{else}{literal} $('#b-ppsunpaid').html(number_format(data.getdashboarddata.data.personal.shares.unpaid)); $('#b-ppsdiff').html(number_format(data.getdashboarddata.data.personal.sharedifficulty, 2)); - $('#b-est1').html(number_format(data.getdashboarddata.data.personal.estimates.hours1, 8)); - $('#b-est24hours').html(number_format(data.getdashboarddata.data.personal.estimates.hours24, 8)); - $('#b-est7days').html(number_format(data.getdashboarddata.data.personal.estimates.days7, 8)); - $('#b-est14days').html(number_format(data.getdashboarddata.data.personal.estimates.days14, 8)); - $('#b-est30days').html(number_format(data.getdashboarddata.data.personal.estimates.days30, 8)); + $('#b-est1').html(number_format(data.getdashboarddata.data.personal.estimates.hours1, {/literal}{$PRECISION}{literal})); + $('#b-est24hours').html(number_format(data.getdashboarddata.data.personal.estimates.hours24, {/literal}{$PRECISION}{literal})); + $('#b-est7days').html(number_format(data.getdashboarddata.data.personal.estimates.days7, {/literal}{$PRECISION}{literal})); + $('#b-est14days').html(number_format(data.getdashboarddata.data.personal.estimates.days14, {/literal}{$PRECISION}{literal})); + $('#b-est30days').html(number_format(data.getdashboarddata.data.personal.estimates.days30, {/literal}{$PRECISION}{literal})); {/literal}{/if}{literal} {/literal}{if $GLOBAL.config.payout_system == 'pplns'}{literal} $('#b-pplns').html({/literal}{$GLOBAL.pplns.target}{literal}); diff --git a/templates/bootstrap/dashboard/round_statistics/pplns/round.tpl b/templates/bootstrap/dashboard/round_statistics/pplns/round.tpl index 8abfe411..234e31ce 100644 --- a/templates/bootstrap/dashboard/round_statistics/pplns/round.tpl +++ b/templates/bootstrap/dashboard/round_statistics/pplns/round.tpl @@ -37,10 +37,10 @@
-

{$GLOBAL.userdata.estimates.payout|number_format:"8"}

+

{$GLOBAL.userdata.estimates.payout|number_format:$PRECISION}

-

{$GLOBAL.config.currency} Est Earnings

+

{$GLOBAL.config.currency} Est. Earnings

@@ -67,11 +67,10 @@
-

{if $GLOBAL.nethashrate > 0}{$NETWORK.EstNextDifficulty|number_format:"8"}{else}n/a{/if}

-

{if $GLOBAL.nethashrate > 0}Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}

+

{if $GLOBAL.nethashrate > 0}{$NETWORK.EstNextDifficulty|number_format:"8"}{else}n/a{/if}

-

Est Next Difficulty

+

Est Next Difficulty{if $GLOBAL.nethashrate > 0}
Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}

diff --git a/templates/bootstrap/dashboard/round_statistics/pps/round.tpl b/templates/bootstrap/dashboard/round_statistics/pps/round.tpl index e11186cb..7fc95e6c 100644 --- a/templates/bootstrap/dashboard/round_statistics/pps/round.tpl +++ b/templates/bootstrap/dashboard/round_statistics/pps/round.tpl @@ -1,55 +1,154 @@