fix: "Generate address" become secondary after generation

This commit is contained in:
Thomas Ballivet 2025-05-06 20:36:21 +02:00
parent 15f4dc1ed1
commit d2c6f9bb96

View File

@ -108,10 +108,15 @@ pub fn receive<'a>(
Row::new()
.align_y(Alignment::Center)
.push(Container::new(h3("Receive")).width(Length::Fill))
.push(
button::primary(Some(icon::plus_icon()), "Generate address")
.on_press(Message::NextReceiveAddress),
),
.push({
let (icon, label) = (Some(icon::plus_icon()), "Generate address");
if addresses.is_empty() {
button::primary(icon, label)
} else {
button::secondary(icon, label)
}
.on_press(Message::NextReceiveAddress)
}),
)
.push(text("Always generate a new address for each deposit."))
.push(