mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
prevent double loading of data
This commit is contained in:
parent
e81521e374
commit
89f806f394
1 changed files with 13 additions and 13 deletions
|
@ -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,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue