Merge pull request #538 from nicoschtein/issue-537

Issue #537
This commit is contained in:
Sebastian Grewe 2013-07-30 23:57:03 -07:00
commit cb50aa66ba
2 changed files with 14 additions and 0 deletions

View File

@ -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");

View File

@ -12,5 +12,11 @@
<th>Liquid Assets</th>
<td class="right">{($BALANCE - $LOCKED)|number_format:"8"}</td>
</tr>
{if $NEWMINT >= 0}
<tr>
<th>PoS New Mint</th>
<td class="right">{$NEWMINT|number_format:"8"}</td>
</tr>
{/if}
</table>
{include file="global/block_footer.tpl"}