diff --git a/public/include/pages/admin/wallet.inc.php b/public/include/pages/admin/wallet.inc.php index daf8d050..2e150bc9 100644 --- a/public/include/pages/admin/wallet.inc.php +++ b/public/include/pages/admin/wallet.inc.php @@ -11,7 +11,16 @@ 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->getbalance(); - $dAddresses = $bitcoin->getaddressesbyaccount(''); + + $dWalletAccounts = $bitcoin->listaccounts(); + $dAddressCount = count($dWalletAccounts); + + $dAccountAddresses = array(); + foreach($dWalletAccounts as $key => $value) + { + $dAccountAddresses[$key] = $bitcoin->getaddressesbyaccount($key); + } + $aGetInfo = $bitcoin->getinfo(); if (is_array($aGetInfo) && array_key_exists('newmint', $aGetInfo)) { $dNewmint = $aGetInfo['newmint']; @@ -38,7 +47,9 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { if (! $dColdCoins = $setting->getValue('wallet_cold_coins')) $dColdCoins = 0; $smarty->assign("UNCONFIRMED", $dBlocksUnconfirmedBalance); $smarty->assign("BALANCE", $dBalance); - $smarty->assign("ADDRESSES", $dAddresses); + $smarty->assign("ADDRESSCOUNT", $dAddressCount); + $smarty->assign("ACCOUNTADDRESSES", $dAccountAddresses); + $smarty->assign("ACCOUNTS", $dWalletAccounts); $smarty->assign("COLDCOINS", $dColdCoins); $smarty->assign("LOCKED", $dLockedBalance); $smarty->assign("NEWMINT", $dNewmint); diff --git a/public/templates/mpos/admin/wallet/default.tpl b/public/templates/mpos/admin/wallet/default.tpl index f5a4d94c..f16a6dba 100644 --- a/public/templates/mpos/admin/wallet/default.tpl +++ b/public/templates/mpos/admin/wallet/default.tpl @@ -1,76 +1,89 @@ -
-

Balance Summary

- - - - - - - - - - - - - - - - - +
+

Wallet Information - Number of Accounts in Wallet: {$ADDRESSCOUNT|default:"0"}

+ +
+

Balance Summary

+
Wallet Balance{$BALANCE|number_format:"8"}
Locked for users{$LOCKED|number_format:"8"}
Unconfirmed{$UNCONFIRMED|number_format:"8"}
Liquid Assets{($BALANCE - $LOCKED)|number_format:"8"}
+ + + + + + + + + + + + + + + + {if $NEWMINT >= 0} - - - - + + + + {/if} -
Wallet Balance{$BALANCE|number_format:"8"}
Locked for users{$LOCKED|number_format:"8"}
Unconfirmed{$UNCONFIRMED|number_format:"8"}
Liquid Assets{($BALANCE - $LOCKED)|number_format:"8"}
PoS New Mint{$NEWMINT|number_format:"8"}
PoS New Mint{$NEWMINT|number_format:"8"}
+ +
+ +
+

Network Information

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

Wallet Information

- - - - - - - - - +{foreach key=NAME item=VALUE from=$ACCOUNTS} +
+

Account: {$NAME|default:"Default"}

+
+

Balance Info

+
VersionProtocol VersionWallet VersionConnectionsErrors
- - - - - + + - -
{$COININFO.version|default:""}{$COININFO.protocolversion|default:""}{$COININFO.walletversion|default:""}{$COININFO.connections|default:""}{$COININFO.errors|default:"OK"}Balance{$VALUE|number_format:"8"}
+ +
+ +{foreach key=ACCOUNT item=ADDRESS from=$ACCOUNTADDRESSES} +{if $ACCOUNT == $NAME} +
+

Addresses assigned to Account {$ACCOUNT|default:"Default"}

+ + +{foreach from=$ACCOUNTADDRESSES[$ACCOUNT] key=ACCOUNT1 item=ADDRESS1} + + + +{/foreach} + +
{$ADDRESS1}
+
+{/if} +{/foreach} +{/foreach} + -
- -





-
-
-

Addresses assigned to Default Wallet

- - - - - - -{assign var=rank value=1} -{section address $ADDRESSES} - - - - -{/section} - -
#Address
{$rank++}{$ADDRESSES[address]}
-
\ No newline at end of file