diff --git a/zcash_client_sqlite/src/wallet/sapling.rs b/zcash_client_sqlite/src/wallet/sapling.rs index 425e0d12d..9e1ed2e02 100644 --- a/zcash_client_sqlite/src/wallet/sapling.rs +++ b/zcash_client_sqlite/src/wallet/sapling.rs @@ -150,6 +150,7 @@ pub(crate) fn get_spendable_sapling_notes( FROM sapling_received_notes INNER JOIN transactions ON transactions.id_tx = sapling_received_notes.tx WHERE account = :account + AND commitment_tree_position IS NOT NULL AND spent IS NULL AND transactions.block <= :anchor_height AND id_note NOT IN rarray(:exclude) @@ -223,6 +224,7 @@ pub(crate) fn select_spendable_sapling_notes( INNER JOIN transactions ON transactions.id_tx = sapling_received_notes.tx WHERE account = :account + AND commitment_tree_position IS NOT NULL AND spent IS NULL AND transactions.block <= :anchor_height AND id_note NOT IN rarray(:exclude)