diff --git a/web/yaamp/modules/site/coin_results.php b/web/yaamp/modules/site/coin_results.php index 4f0be2f..2a9a7dc 100644 --- a/web/yaamp/modules/site/coin_results.php +++ b/web/yaamp/modules/site/coin_results.php @@ -179,7 +179,13 @@ if (!empty($info)) { if ($DCR) { // Decred Tickets - $stake = $remote->getbalance('*',0,'locked'); + $stake = 0; + $balances = $remote->getbalance('*',0); + if (isset($balances["balances"])) { + foreach ($balances["balances"] as $accb) { + $stake += arraySafeVal($accb, 'lockedbytickets', 0); + } + } $stakeinfo = $remote->getstakeinfo(); $ticketprice = arraySafeVal($stakeinfo,'difficulty'); $tickets = arraySafeVal($stakeinfo, 'live', 0); diff --git a/web/yaamp/modules/site/coin_tickets.php b/web/yaamp/modules/site/coin_tickets.php index dcea132..944d950 100644 --- a/web/yaamp/modules/site/coin_tickets.php +++ b/web/yaamp/modules/site/coin_tickets.php @@ -15,7 +15,14 @@ $maxrows = arraySafeVal($_GET,'rows', 2500); $remote = new WalletRPC($coin); $info = $remote->getinfo(); $stakeinfo = $remote->getstakeinfo(); -$locked = $remote->getbalance('*',0,'locked'); +$balances = $remote->getbalance('*',0); +$locked = 0; $balance = 0; +if (isset($balances["balances"])) { + foreach ($balances["balances"] as $accb) { + $locked += arraySafeVal($accb, 'lockedbytickets', 0); + $balance += arraySafeVal($accb, 'spendable', 0); + } +} echo getAdminSideBarLinks().'

'; echo getAdminWalletLinks($coin, $info, 'tickets').'

'; @@ -37,7 +44,7 @@ div.form { text-align: right; height: 30px; width: 350px; float: right; margin-t
Stake: {$locked} {$coin->symbol}
-Balance: {$remote->getbalance()} {$coin->symbol}
+Spendable: {$balance} {$coin->symbol}
@@ -263,8 +270,13 @@ echo 'Tickets: '.$stakeinfo['live']; if ($stakeinfo['immature']) echo ' + '.$stakeinfo['immature'].' immature'; if ($stakeinfo['ownmempooltix']) echo ' + '.$stakeinfo['ownmempooltix'].' purchased'; echo '
'; +if (arraySafeVal($stakeinfo,'missed',false)) { + echo 'Missed: '.arraySafeVal($stakeinfo,'missed', -1); + echo ' ('.arraySafeVal($stakeinfo,'revoked',0).' revoked'; + echo ', '.arraySafeVal($stakeinfo,'expired',0).' expired'; + echo ')
'; +} echo 'Total won: '.$stakeinfo['totalsubsidy'].' '.$coin->symbol.' ('.$stakeinfo['voted'].')
'; -if ($stakeinfo['missed']) echo 'Missed: '.$stakeinfo['missed'].' '.$stakeinfo['revoked'].' revoked
'; $staking = $remote->getgenerate() > 0 ? 'enabled' : 'disabled'; echo '
';