fix: propagate buy/sell crypto address to providers without needing to focus the field (#3324)

David Adegoke committed Jun 10, 2026 at 18:54 UTC 782253a65389c70f0a1748a51b58d27516be3bbf
1 file changed +4 -4
lib/src/screens/buy/buy_sell_page.dart
+4 -4
@@ -264,6 +264,10 @@ class BuySellPage extends BasePage {
264 final cryptoAmountController = cryptoCurrencyKey.currentState!.amountController;
265 final cryptoAddressController = cryptoCurrencyKey.currentState!.addressController;
266
267 + cryptoAddressController.addListener(() {
268 + buySellViewModel.changeCryptoCurrencyAddress(cryptoAddressController.text);
269 + });
270 +
271 _onCurrencyChange(buySellViewModel.cryptoCurrency, buySellViewModel, cryptoCurrencyKey);
272 _onCurrencyChange(buySellViewModel.fiatCurrency, buySellViewModel, fiatCurrencyKey);
273
@@ -313,10 +317,6 @@ class BuySellPage extends BasePage {
317 }
318 });
319
316 - cryptoAddressController.addListener(() {
317 - buySellViewModel.changeCryptoCurrencyAddress(cryptoAddressController.text);
318 - });
319 -
320 _cryptoAddressFocus.addListener(() async {
321 if (!_cryptoAddressFocus.hasFocus && cryptoAddressController.text.isNotEmpty) {
322 final domain = cryptoAddressController.text;