add token view button to wallet nav bar

This commit is contained in:
julian 2023-03-22 09:39:28 -06:00
parent 9fa2d4535d
commit d2bddcdd8d
2 changed files with 19 additions and 0 deletions

View file

@ -19,6 +19,7 @@ import 'package:stackwallet/pages/receive_view/receive_view.dart';
import 'package:stackwallet/pages/send_view/send_view.dart';
import 'package:stackwallet/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart';
import 'package:stackwallet/pages/settings_views/wallet_settings_view/wallet_settings_view.dart';
import 'package:stackwallet/pages/token_view/my_tokens_view.dart';
import 'package:stackwallet/pages/wallet_view/sub_widgets/transactions_list.dart';
import 'package:stackwallet/pages/wallet_view/sub_widgets/wallet_summary.dart';
import 'package:stackwallet/pages/wallet_view/transaction_views/all_transactions_view.dart';
@ -824,6 +825,22 @@ class _WalletViewState extends ConsumerState<WalletView> {
),
],
moreItems: [
if (ref.watch(
walletsChangeNotifierProvider.select(
(value) =>
value.getManager(widget.walletId).hasTokenSupport,
),
))
WalletNavigationBarItemData(
label: "Tokens",
icon: const CoinControlNavIcon(),
onTap: () {
Navigator.of(context).pushNamed(
MyTokensView.routeName,
arguments: walletId,
);
},
),
if (ref.watch(
walletsChangeNotifierProvider.select(
(value) => value

View file

@ -232,6 +232,8 @@ class Manager with ChangeNotifier {
bool get hasCoinControlSupport => _currentWallet is CoinControlInterface;
bool get hasTokenSupport => _currentWallet.coin == Coin.ethereum;
bool get hasWhirlpoolSupport => false;
int get rescanOnOpenVersion =>