mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-30 07:10:35 +00:00
wallet: improve owed/earnings amounts in the header
This commit is contained in:
parent
3b32d4b987
commit
5e882f4419
2 changed files with 4 additions and 3 deletions
|
@ -109,7 +109,7 @@ class PayoutCommand extends CConsoleCommand
|
|||
'order'=>'time DESC',
|
||||
));
|
||||
|
||||
if (empty($payouts))
|
||||
if (empty($payouts) || empty($ids))
|
||||
return 0;
|
||||
|
||||
$remote = new Bitcoin($coin->rpcuser, $coin->rpcpasswd, $coin->rpchost, $coin->rpcport);
|
||||
|
|
|
@ -11,7 +11,6 @@ $reserved1 = dboscalar("select sum(balance) from accounts where coinid=$coin->id
|
|||
$reserved2 = dboscalar("select sum(amount*price) from earnings
|
||||
where status!=2 and userid in (select id from accounts where coinid=$coin->id)");
|
||||
|
||||
$reserved = bitcoinvaluetoa(($reserved1 + $reserved2) * 2);
|
||||
$reserved1 = altcoinvaluetoa($reserved1);
|
||||
$reserved2 = bitcoinvaluetoa($reserved2);
|
||||
$balance = altcoinvaluetoa($coin->balance);
|
||||
|
@ -19,8 +18,10 @@ $balance = altcoinvaluetoa($coin->balance);
|
|||
$owed = dboscalar("select sum(amount) from earnings where status!=2 and coinid=$coin->id");
|
||||
$owed_btc = $owed? bitcoinvaluetoa($owed*$coin->price): '';
|
||||
$owed = $owed? altcoinvaluetoa($owed): '';
|
||||
$symbol = $coin->symbol;
|
||||
if (!empty($coin->officialsymbol)) $symbol = $coin->officialsymbol;
|
||||
|
||||
echo "cleared $reserved1, earnings $reserved2, reserved $reserved, balance $balance, owed $owed, owned btc $owed_btc<br><br>";
|
||||
echo "Earnings $reserved2 BTC, balance (db) $balance $symbol, owed $owed $symbol ($owed_btc BTC), $reserved1 $symbol cleared<br/><br/>";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue