From 5a377d61066656ce3a38db0f2746bdba0a545531 Mon Sep 17 00:00:00 2001 From: Nicolas Schteinschraber Date: Wed, 31 Jul 2013 03:44:49 -0300 Subject: [PATCH] Issue #537 --- public/include/pages/admin/wallet.inc.php | 8 ++++++++ public/templates/mmcFE/admin/wallet/default.tpl | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/public/include/pages/admin/wallet.inc.php b/public/include/pages/admin/wallet.inc.php index fee0fd16..822134dd 100644 --- a/public/include/pages/admin/wallet.inc.php +++ b/public/include/pages/admin/wallet.inc.php @@ -13,8 +13,15 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { $debug->append('No cached version available, fetching from backend', 3); if ($bitcoin->can_connect() === true){ $dBalance = $bitcoin->query('getbalance'); + $dGetInfo = $bitcoin->query('getinfo'); + if (is_array($dGetInfo) && array_key_exists('newmint', $dGetInfo)) { + $dNewmint = $dGetInfo['newmint']; + } else { + $dNewmint = -1; + } } else { $dBalance = 0; + $dNewmint = -1; $_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to wallet RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg'); } // Fetch locked balance from transactions @@ -25,6 +32,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { $smarty->assign("BALANCE", $dBalance); $smarty->assign("LOCKED", $dLockedBalance); +$smarty->assign("NEWMINT", $dNewmint); // Tempalte specifics $smarty->assign("CONTENT", "default.tpl"); diff --git a/public/templates/mmcFE/admin/wallet/default.tpl b/public/templates/mmcFE/admin/wallet/default.tpl index 42b8c8b3..ed1093d6 100644 --- a/public/templates/mmcFE/admin/wallet/default.tpl +++ b/public/templates/mmcFE/admin/wallet/default.tpl @@ -12,5 +12,11 @@ Liquid Assets {($BALANCE - $LOCKED)|number_format:"8"} +{if $NEWMINT >= 0} + + PoS New Mint + {$NEWMINT|number_format:"8"} + +{/if} {include file="global/block_footer.tpl"}