mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
add token view button to wallet nav bar
This commit is contained in:
parent
9fa2d4535d
commit
d2bddcdd8d
2 changed files with 19 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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 =>
|
||||
|
|
Loading…
Reference in a new issue