mobile xmr/wow loading fix

This commit is contained in:
julian 2023-01-02 11:08:13 -06:00
parent 57add19e88
commit 838678eb06

View file

@ -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,