From d98bb2f368c7b3f7482b9df8963d06ca625b2e74 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sat, 7 Dec 2013 13:59:33 +0100 Subject: [PATCH] [ADDED] getInfo output to wallet information Adds some additional wallet infos to the wallet info page in the admin panel. Specifically the errors output might be interesting for users not checking their RPC regularly for mandatory updates. Fixes #912 once merged. --- public/include/pages/admin/wallet.inc.php | 8 +++--- .../templates/mpos/admin/wallet/default.tpl | 26 +++++++++++++++++-- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/public/include/pages/admin/wallet.inc.php b/public/include/pages/admin/wallet.inc.php index 1e2d2659..b057b4d1 100644 --- a/public/include/pages/admin/wallet.inc.php +++ b/public/include/pages/admin/wallet.inc.php @@ -13,13 +13,14 @@ 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']; + $aGetInfo = $bitcoin->query('getinfo'); + if (is_array($aGetInfo) && array_key_exists('newmint', $aGetInfo)) { + $dNewmint = $aGetInfo['newmint']; } else { $dNewmint = -1; } } else { + $aGetInfo = array('errors' => 'Unable to connect'); $dBalance = 0; $dNewmint = -1; $_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to wallet RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg'); @@ -45,6 +46,7 @@ $smarty->assign("BALANCE", $dBalance); $smarty->assign("COLDCOINS", $dColdCoins); $smarty->assign("LOCKED", $dLockedBalance); $smarty->assign("NEWMINT", $dNewmint); +$smarty->assign("COININFO", $aGetInfo); // Tempalte specifics $smarty->assign("CONTENT", "default.tpl"); diff --git a/public/templates/mpos/admin/wallet/default.tpl b/public/templates/mpos/admin/wallet/default.tpl index 033101aa..d3485a60 100644 --- a/public/templates/mpos/admin/wallet/default.tpl +++ b/public/templates/mpos/admin/wallet/default.tpl @@ -1,6 +1,6 @@
-

Wallet Information

- +

Balance Summary

+
@@ -25,3 +25,25 @@ {/if}
Wallet Balance {$BALANCE|number_format:"8"}
+ +
+

Wallet Information

+ + + + + + + + + + + + + + + + + +
VersionProtocol VersionWallet VersionConnectionsErrors
{$COININFO.version|default:""}{$COININFO.protocolversion|default:""}{$COININFO.walletversion|default:""}{$COININFO.connections|default:""}{$COININFO.errors|default:"OK"}
+