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

This commit is contained in:
David Adegoke
2026-06-10 19:54:54 +02:00
committed by GitHub
parent 99f96b0a78
commit 782253a653
+4 -4
View File
@@ -264,6 +264,10 @@ class BuySellPage extends BasePage {
final cryptoAmountController = cryptoCurrencyKey.currentState!.amountController;
final cryptoAddressController = cryptoCurrencyKey.currentState!.addressController;
cryptoAddressController.addListener(() {
buySellViewModel.changeCryptoCurrencyAddress(cryptoAddressController.text);
});
_onCurrencyChange(buySellViewModel.cryptoCurrency, buySellViewModel, cryptoCurrencyKey);
_onCurrencyChange(buySellViewModel.fiatCurrency, buySellViewModel, fiatCurrencyKey);
@@ -313,10 +317,6 @@ class BuySellPage extends BasePage {
}
});
cryptoAddressController.addListener(() {
buySellViewModel.changeCryptoCurrencyAddress(cryptoAddressController.text);
});
_cryptoAddressFocus.addListener(() async {
if (!_cryptoAddressFocus.hasFocus && cryptoAddressController.text.isNotEmpty) {
final domain = cryptoAddressController.text;