mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-11 04:59:46 +00:00
wallet: ignore spent blocks in listtransactions and fix order
unlike other wallets, a send operation generate 2 "transactions" one for the send, and another with a bad time for the "spent" block
This commit is contained in:
parent
c28400a92e
commit
35e0ada99d
1 changed files with 12 additions and 2 deletions
|
@ -215,7 +215,11 @@ if (!empty($txs)) {
|
||||||
if (intval($tx['time']) > $list_since)
|
if (intval($tx['time']) > $list_since)
|
||||||
$txs_array[] = $tx;
|
$txs_array[] = $tx;
|
||||||
}
|
}
|
||||||
krsort($txs_array);
|
|
||||||
|
if ($coin->symbol == 'DCR')
|
||||||
|
ksort($txs_array); // reversed order
|
||||||
|
else
|
||||||
|
krsort($txs_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows = 0;
|
$rows = 0;
|
||||||
|
@ -226,8 +230,14 @@ foreach($txs_array as $tx)
|
||||||
$block = $remote->getblock($tx['blockhash']);
|
$block = $remote->getblock($tx['blockhash']);
|
||||||
|
|
||||||
$d = datetoa2($tx['time']);
|
$d = datetoa2($tx['time']);
|
||||||
|
|
||||||
$category = $tx['category'];
|
$category = $tx['category'];
|
||||||
|
|
||||||
|
if ($coin->symbol == 'DCR') {
|
||||||
|
// ignore "spent" blocks...
|
||||||
|
if ($category == 'send' && arraySafeVal($tx,'generated'))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
echo '<tr class="ssrow '.$category.'">';
|
echo '<tr class="ssrow '.$category.'">';
|
||||||
echo '<td><b>'.$d.'</b></td>';
|
echo '<td><b>'.$d.'</b></td>';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue