set wallet coin in exchange view

This commit is contained in:
julian 2023-03-10 16:47:48 -06:00
parent cbbbbc0796
commit a5a2dcef64

View file

@ -618,6 +618,16 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
if (walletInitiated) {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
ref.read(exchangeFormStateProvider).reset(shouldNotifyListeners: true);
ExchangeDataLoadingService.instance
.getAggregateCurrency(
coin!.ticker,
ExchangeRateType.estimated,
)
.then((value) {
if (value != null) {
ref.read(exchangeFormStateProvider).updateSendCurrency(value, true);
}
});
});
} else {
_sendController.text =