Fix: incorrect query allowing change to show up in TX list.
Originally identified by @pacu on the iOS side. We paired up and fixed and tested the query over there.
This commit is contained in:
parent
928eac9af0
commit
8d8a1ae8a8
|
@ -280,9 +280,10 @@ interface TransactionDao {
|
|||
ON transactions.id_tx = sent_notes.tx
|
||||
LEFT JOIN blocks
|
||||
ON transactions.block = blocks.height
|
||||
WHERE ( transactions.raw IS NULL
|
||||
AND received_notes.is_change != 1 )
|
||||
OR ( transactions.raw IS NOT NULL )
|
||||
/* we want all received txs except those that are change and all sent transactions (even those that haven't been mined yet). Note: every entry in the 'send_notes' table has a non-null value for 'address' */
|
||||
WHERE ( sent_notes.address IS NULL
|
||||
AND received_notes.is_change != 1 )
|
||||
OR sent_notes.address IS NOT NULL
|
||||
ORDER BY ( minedheight IS NOT NULL ),
|
||||
minedheight DESC,
|
||||
blocktimeinseconds DESC,
|
||||
|
|
Loading…
Reference in New Issue