fix: grey out next button in case of error

It should not be possible to click the Next button if there's
any error.

This could arise for a self-send if a very high feerate is chosen
and there are insufficient funds. In this case, the Next button
will now be greyed out until form values are edited and the error
has disappeared.
This commit is contained in:
Michael Mallan 2025-04-15 12:03:31 +01:00
parent 71541c69ba
commit 934d0c76f4
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB

View File

@ -300,6 +300,7 @@ pub fn create_spend_tx<'a>(
.push(
if is_valid
&& !duplicate
&& error.is_none()
&& (is_self_send || Some(&Amount::from_sat(0)) == amount_left)
{
button::secondary(None, "Next")