From 4130d36472f6bfcb0f9224a09c466be066536f5a Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sat, 26 Mar 2022 12:36:06 +0100 Subject: [PATCH] only enable transfer button if a valid transfer account is selected --- http-client/src/components/account.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/http-client/src/components/account.rs b/http-client/src/components/account.rs index 91457e3..d913797 100644 --- a/http-client/src/components/account.rs +++ b/http-client/src/components/account.rs @@ -36,6 +36,10 @@ impl Account { } } + fn is_transfer_account_valid(&self) -> bool { + self.selected_transfer_account().is_some() + } + fn is_amount_valid(&self) -> bool { self.amount() > 0_f64 } @@ -157,7 +161,7 @@ impl Component for Account { - +