From 89f806f3945dadc0bb312e3fdef80e592eacad18 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 2 May 2023 08:24:37 -0600 Subject: [PATCH] prevent double loading of data --- .../sub_widgets/exchange_provider_option.dart | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/pages/exchange_view/sub_widgets/exchange_provider_option.dart b/lib/pages/exchange_view/sub_widgets/exchange_provider_option.dart index ed161553c..7c6d625ed 100644 --- a/lib/pages/exchange_view/sub_widgets/exchange_provider_option.dart +++ b/lib/pages/exchange_view/sub_widgets/exchange_provider_option.dart @@ -13,7 +13,6 @@ import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/logger.dart'; -import 'package:stackwallet/utilities/show_loading.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/util.dart'; @@ -76,17 +75,18 @@ class _ExchangeProviderOptionState child: GestureDetector( onTap: () { if (!selected) { - showLoading( - whileFuture: ref.read(exchangeFormStateProvider).updateExchange( - exchange: widget.exchange, - shouldUpdateData: true, - shouldNotifyListeners: true, - providerName: widget.exchangeProvider, - ), - context: context, - message: "Updating rates", - isDesktop: isDesktop, - ); + // showLoading( + // whileFuture: + ref.read(exchangeFormStateProvider).updateExchange( + exchange: widget.exchange, + shouldUpdateData: true, + shouldNotifyListeners: true, + providerName: widget.exchangeProvider, + // ), + // context: context, + // message: "Updating rates", + // isDesktop: isDesktop, + ); } }, child: Container( @@ -113,7 +113,7 @@ class _ExchangeProviderOptionState if (!selected) { ref.read(exchangeFormStateProvider).updateExchange( exchange: widget.exchange, - shouldUpdateData: true, + shouldUpdateData: false, shouldNotifyListeners: true, providerName: widget.exchangeProvider, );