fix: improve German translations and button color logic in exchange trade page (#2400)

Konstantin Ullrich committed Jul 23, 2025 at 00:51 UTC ce5b838d963b2e91f7df46eefb21201f62a05430
2 files changed +22 -17
lib/src/screens/exchange_trade/exchange_trade_page.dart
+19 -14
@@ -174,8 +174,12 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
174 onPressed: () async {
175 Navigator.of(context).pushNamed(Routes.exchangeTradeExternalSendPage);
176 },
177 - color: Theme.of(context).colorScheme.surfaceContainer,
178 - textColor: Theme.of(context).colorScheme.onSecondaryContainer,
177 + color: widget.exchangeTradeViewModel.isSendable
178 + ? Theme.of(context).colorScheme.surfaceContainer
179 + : Theme.of(context).colorScheme.primary,
180 + textColor: widget.exchangeTradeViewModel.isSendable
181 + ? Theme.of(context).colorScheme.onSecondaryContainer
182 + : Theme.of(context).colorScheme.onPrimary,
183 ),
184 SizedBox(height: 16),
185 Observer(
@@ -183,18 +187,19 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
187 final trade = widget.exchangeTradeViewModel.trade;
188 final sendingState = widget.exchangeTradeViewModel.sendViewModel.state;
189
186 - return widget.exchangeTradeViewModel.isSendable &&
187 - !(sendingState is TransactionCommitted)
188 - ? LoadingPrimaryButton(
189 - key: ValueKey('exchange_trade_page_send_from_cake_button_key'),
190 - isDisabled: trade.inputAddress == null || trade.inputAddress!.isEmpty,
191 - isLoading: sendingState is IsExecutingState,
192 - onPressed: () => widget.exchangeTradeViewModel.confirmSending(),
193 - text: S.current.send_from_cake_wallet,
194 - color: Theme.of(context).colorScheme.primary,
195 - textColor: Theme.of(context).colorScheme.onPrimary,
196 - )
197 - : Offstage();
190 + return Offstage(
191 + offstage: !(widget.exchangeTradeViewModel.isSendable &&
192 + !(sendingState is TransactionCommitted)),
193 + child: LoadingPrimaryButton(
194 + key: ValueKey('exchange_trade_page_send_from_cake_button_key'),
195 + isDisabled: trade.inputAddress == null || trade.inputAddress!.isEmpty,
196 + isLoading: sendingState is IsExecutingState,
197 + onPressed: () => widget.exchangeTradeViewModel.confirmSending(),
198 + text: S.current.send_from_cake_wallet,
199 + color: Theme.of(context).colorScheme.primary,
200 + textColor: Theme.of(context).colorScheme.onPrimary,
201 + ),
202 + );
203 },
204 ),
205 ],
res/values/strings_de.arb
+3 -3
@@ -782,8 +782,8 @@
782 "send_error_minimum_value": "Der Mindestbetrag ist 0,01",
783 "send_estimated_fee": "Geschätzte Gebühr:",
784 "send_fee": "Gebühr:",
785 - "send_from_cake_wallet": "Senden Sie aus Kuchenbrieftasche",
786 - "send_from_external_wallet": "Senden Sie aus der Außenschreibe",
785 + "send_from_cake_wallet": "Aus Cake Wallet senden",
786 + "send_from_external_wallet": "Aus externer Wallet senden",
787 "send_name": "Name",
788 "send_new": "Neu",
789 "send_payjoin": "Payjoin senden",
@@ -1128,4 +1128,4 @@
1128 "you_will_send": "Konvertieren von",
1129 "youCanGoBackToYourDapp": "Sie können jetzt zu Ihrem Dapp zurückkehren",
1130 "yy": "YY"
1131 -}
\ No newline at end of file
1131 +}