From 838678eb0618d093bce04a30cad709b0b5fb7b8b Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 2 Jan 2023 11:08:13 -0600 Subject: [PATCH] mobile xmr/wow loading fix --- lib/widgets/wallet_card.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/widgets/wallet_card.dart b/lib/widgets/wallet_card.dart index 0e8a515bd..194033de3 100644 --- a/lib/widgets/wallet_card.dart +++ b/lib/widgets/wallet_card.dart @@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:stackwallet/pages/wallet_view/wallet_view.dart'; import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/utilities/constants.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/widgets/rounded_white_container.dart'; import 'package:stackwallet/widgets/wallet_info_row/wallet_info_row.dart'; import 'package:tuple/tuple.dart'; @@ -31,7 +32,14 @@ class WalletSheetCard extends ConsumerWidget { Constants.size.circularBorderRadius, ), ), - onPressed: () { + onPressed: () async { + final manager = ref + .read(walletsChangeNotifierProvider) + .getManager(walletId); + if (manager.coin == Coin.monero || + manager.coin == Coin.wownero) { + await manager.initializeExisting(); + } if (popPrevious) Navigator.of(context).pop(); Navigator.of(context).pushNamed( WalletView.routeName,