mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
token loading screen navigation fix
This commit is contained in:
parent
fa1dbdbe51
commit
26bddae248
1 changed files with 7 additions and 5 deletions
|
@ -26,6 +26,7 @@ import 'package:stackwallet/services/ethereum/ethereum_token_service.dart';
|
||||||
import 'package:stackwallet/services/transaction_notification_tracker.dart';
|
import 'package:stackwallet/services/transaction_notification_tracker.dart';
|
||||||
import 'package:stackwallet/utilities/constants.dart';
|
import 'package:stackwallet/utilities/constants.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.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/show_loading.dart';
|
||||||
import 'package:stackwallet/utilities/util.dart';
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||||
|
@ -136,17 +137,18 @@ class SimpleWalletCard extends ConsumerWidget {
|
||||||
context: desktopNavigatorState?.context ?? context,
|
context: desktopNavigatorState?.context ?? context,
|
||||||
opaqueBG: true,
|
opaqueBG: true,
|
||||||
message: "Loading ${contract.name}",
|
message: "Loading ${contract.name}",
|
||||||
|
isDesktop: Util.isDesktop,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
// TODO: show error dialog here?
|
||||||
|
Logging.instance.log(
|
||||||
|
"Failed to load token wallet for $contract",
|
||||||
|
level: LogLevel.Error,
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (desktopNavigatorState == null) {
|
|
||||||
// pop loading
|
|
||||||
nav.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (desktopNavigatorState != null) {
|
if (desktopNavigatorState != null) {
|
||||||
await desktopNavigatorState!.pushNamed(
|
await desktopNavigatorState!.pushNamed(
|
||||||
DesktopTokenView.routeName,
|
DesktopTokenView.routeName,
|
||||||
|
|
Loading…
Reference in a new issue