diff --git a/src/Template/Main/blocks.ctp b/src/Template/Main/blocks.ctp
index 55283c5..41980df 100644
--- a/src/Template/Main/blocks.ctp
+++ b/src/Template/Main/blocks.ctp
@@ -63,7 +63,7 @@
Difficulty
Nonce
- Amount->format($block->Difficulty) ?>
+ Amount->format($block->Difficulty, '') ?>
Nonce ?>
diff --git a/src/View/Helper/AmountHelper.php b/src/View/Helper/AmountHelper.php
index 2378206..fffa9b8 100644
--- a/src/View/Helper/AmountHelper.php
+++ b/src/View/Helper/AmountHelper.php
@@ -5,8 +5,8 @@ namespace App\View\Helper;
use Cake\View\Helper;
class AmountHelper extends Helper {
- public function format($value) {
- $value = number_format($value, 8, '.', ',');
+ public function format($value, $thousandsSeparator = '') {
+ $value = number_format($value, 8, '.', $thousandsSeparator);
$dotIdx = strpos($value, '.');
if ($dotIdx !== false) {
$left = substr($value, 0, $dotIdx);
@@ -21,13 +21,13 @@ class AmountHelper extends Helper {
return $value;
}
- public function formatCurrency($value) {
+ public function formatCurrency($value, $thousandsSeparator = '') {
$dotIdx = strpos($value, '.');
if ($dotIdx !== false) {
$left = substr($value, 0, $dotIdx);
$right = substr($value, $dotIdx + 1);
- $value = number_format($left, 0, '', ',');
+ $value = number_format($left, 0, '', $thousandsSeparator);
if ((int) $right > 0) {
if (strlen($right) === 1) {
$value .= '.' . $right . '0';