mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-23 19:05:51 +00:00
fix initial wallet not showing up on creation
This commit is contained in:
parent
86be1444ea
commit
89c781ef23
4 changed files with 6 additions and 6 deletions
|
@ -72,6 +72,7 @@ import 'package:stackwallet/utilities/logger.dart';
|
||||||
import 'package:stackwallet/utilities/prefs.dart';
|
import 'package:stackwallet/utilities/prefs.dart';
|
||||||
import 'package:stackwallet/utilities/stack_file_system.dart';
|
import 'package:stackwallet/utilities/stack_file_system.dart';
|
||||||
import 'package:stackwallet/utilities/util.dart';
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
import 'package:stackwallet/wallets/isar/providers/all_wallets_info_provider.dart';
|
||||||
import 'package:stackwallet/widgets/crypto_notifications.dart';
|
import 'package:stackwallet/widgets/crypto_notifications.dart';
|
||||||
import 'package:window_size/window_size.dart';
|
import 'package:window_size/window_size.dart';
|
||||||
|
|
||||||
|
@ -747,7 +748,7 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
|
||||||
builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
|
builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
// FlutterNativeSplash.remove();
|
// FlutterNativeSplash.remove();
|
||||||
if (ref.read(pWallets).hasWallets ||
|
if (ref.read(pAllWalletsInfo).isNotEmpty ||
|
||||||
ref.read(prefsChangeNotifierProvider).hasPin) {
|
ref.read(prefsChangeNotifierProvider).hasPin) {
|
||||||
// return HomeView();
|
// return HomeView();
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ import 'package:stackwallet/pages/wallets_view/sub_widgets/empty_wallets.dart';
|
||||||
import 'package:stackwallet/pages/wallets_view/sub_widgets/favorite_wallets.dart';
|
import 'package:stackwallet/pages/wallets_view/sub_widgets/favorite_wallets.dart';
|
||||||
import 'package:stackwallet/providers/providers.dart';
|
import 'package:stackwallet/providers/providers.dart';
|
||||||
import 'package:stackwallet/themes/theme_providers.dart';
|
import 'package:stackwallet/themes/theme_providers.dart';
|
||||||
|
import 'package:stackwallet/wallets/isar/providers/all_wallets_info_provider.dart';
|
||||||
|
|
||||||
class WalletsView extends ConsumerWidget {
|
class WalletsView extends ConsumerWidget {
|
||||||
const WalletsView({Key? key}) : super(key: key);
|
const WalletsView({Key? key}) : super(key: key);
|
||||||
|
@ -25,7 +26,7 @@ class WalletsView extends ConsumerWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
debugPrint("BUILD: $runtimeType");
|
debugPrint("BUILD: $runtimeType");
|
||||||
final hasWallets = ref.watch(pWallets).hasWallets;
|
final hasWallets = ref.watch(pAllWalletsInfo).isNotEmpty;
|
||||||
|
|
||||||
final showFavorites = ref.watch(prefsChangeNotifierProvider
|
final showFavorites = ref.watch(prefsChangeNotifierProvider
|
||||||
.select((value) => value.showFavoriteWallets));
|
.select((value) => value.showFavoriteWallets));
|
||||||
|
|
|
@ -16,9 +16,9 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:stackwallet/pages/settings_views/global_settings_view/hidden_settings.dart';
|
import 'package:stackwallet/pages/settings_views/global_settings_view/hidden_settings.dart';
|
||||||
import 'package:stackwallet/pages/wallets_view/sub_widgets/empty_wallets.dart';
|
import 'package:stackwallet/pages/wallets_view/sub_widgets/empty_wallets.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/my_stack_view/my_wallets.dart';
|
import 'package:stackwallet/pages_desktop_specific/my_stack_view/my_wallets.dart';
|
||||||
import 'package:stackwallet/providers/global/wallets_provider.dart';
|
|
||||||
import 'package:stackwallet/themes/theme_providers.dart';
|
import 'package:stackwallet/themes/theme_providers.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/wallets/isar/providers/all_wallets_info_provider.dart';
|
||||||
import 'package:stackwallet/widgets/animated_widgets/rotate_icon.dart';
|
import 'package:stackwallet/widgets/animated_widgets/rotate_icon.dart';
|
||||||
import 'package:stackwallet/widgets/background.dart';
|
import 'package:stackwallet/widgets/background.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||||
|
@ -36,7 +36,7 @@ class _MyStackViewState extends ConsumerState<MyStackView> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
debugPrint("BUILD: $runtimeType");
|
debugPrint("BUILD: $runtimeType");
|
||||||
final hasWallets = ref.watch(pWallets).hasWallets;
|
final hasWallets = ref.watch(pAllWalletsInfo).isNotEmpty;
|
||||||
|
|
||||||
return Background(
|
return Background(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
|
@ -35,8 +35,6 @@ class Wallets {
|
||||||
late NodeService nodeService;
|
late NodeService nodeService;
|
||||||
late MainDB mainDB;
|
late MainDB mainDB;
|
||||||
|
|
||||||
bool get hasWallets => _wallets.isNotEmpty;
|
|
||||||
|
|
||||||
List<Wallet> get wallets => _wallets.values.toList();
|
List<Wallet> get wallets => _wallets.values.toList();
|
||||||
|
|
||||||
static bool hasLoaded = false;
|
static bool hasLoaded = false;
|
||||||
|
|
Loading…
Reference in a new issue