From 155b9ab32c9917ce3cac895818753ca16b5d7d69 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Mon, 4 Aug 2025 03:13:20 +0300 Subject: [PATCH] change send button text when disabled --- lib/src/screens/send/send_page.dart | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index e75cba9ed..96babfa7c 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -470,9 +470,7 @@ class SendPage extends BasePage { }, ); }, - text: sendViewModel.payjoinUri != null - ? S.of(context).send_payjoin - : S.of(context).send, + text: _sendButtonText(context), color: Theme.of(context).colorScheme.primary, textColor: Theme.of(context).colorScheme.onPrimary, isLoading: sendViewModel.state is IsExecutingState || @@ -841,4 +839,15 @@ class SendPage extends BasePage { return isValid; } + + String _sendButtonText(BuildContext context) { + if (!sendViewModel.isReadyForSend) { + return S.of(context).synchronizing; + } + if (sendViewModel.payjoinUri != null) { + return S.of(context).send_payjoin; + } else { + return S.of(context).send; + } + } }