diff --git a/lib/src/lightwallet.rs b/lib/src/lightwallet.rs index a2bebb6..f3bf736 100644 --- a/lib/src/lightwallet.rs +++ b/lib/src/lightwallet.rs @@ -1482,10 +1482,17 @@ pub fn scan_full_tx(&self, tx: &Transaction, height: i32, datetime: u64) { try_sapling_note_decryption(ivk, &epk_prime, &output.cmu, &output.enc_ciphertext).is_some() }); - // If this is change (funds to ourself) without a memo, skip it. - // If the user sent a memo to themselves, keep it in outgoing metadata. - if is_to_self && memo.to_utf8().is_none() { - continue; + // If this is change (funds to ourself) without a meaningful memo, skip it. + // memo.to_utf8() returns Some(Ok("")) for empty memos (all-zero bytes), + // so we must also check for empty strings, not just None. + if is_to_self { + let has_memo = match memo.to_utf8() { + Some(Ok(ref s)) if !s.is_empty() => true, + _ => false, + }; + if !has_memo { + continue; + } } // Update the WalletTx // Do it in a short scope because of the write lock.