fix: ignore address with index 0

This is always "revealed" for a new wallet and not generated by
the user.
This commit is contained in:
Michael Mallan 2025-05-15 12:27:01 +01:00
parent e910c06027
commit c629142c58
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB

View File

@ -238,6 +238,11 @@ impl State for ReceivePanel {
&& (start_index.is_some() || self.prev_addresses.is_empty())
{
for entry in revealed.addresses.iter() {
// A new wallet always has index 0 "revealed", but we ignore it as
// it was not generated by the user.
if entry.index == 0.into() {
continue;
}
self.prev_addresses.list.push(entry.address.clone());
self.prev_addresses.derivation_indexes.push(entry.index);
if let Some(label) = &entry.label {