remove manage nodes from lightning wallets

This commit is contained in:
Matthew Fosse 2024-03-08 10:42:14 -08:00
parent e78f17c3d9
commit eb1654c8f0
2 changed files with 15 additions and 4 deletions

View file

@ -89,14 +89,22 @@ class ConnectionSyncPage extends BasePage {
}), }),
], ],
], ],
Observer(
builder: (context) {
if (!dashboardViewModel.hasNodes) return const SizedBox();
return Column(
children: [
SettingsCellWithArrow( SettingsCellWithArrow(
title: S.current.manage_nodes, title: S.current.manage_nodes,
handler: (context) => Navigator.of(context).pushNamed(Routes.manageNodes), handler: (context) => Navigator.of(context).pushNamed(Routes.manageNodes),
), ),
],
);
},
),
Observer( Observer(
builder: (context) { builder: (context) {
if (!dashboardViewModel.hasPowNodes) return const SizedBox(); if (!dashboardViewModel.hasPowNodes) return const SizedBox();
return Column( return Column(
children: [ children: [
SettingsCellWithArrow( SettingsCellWithArrow(

View file

@ -361,6 +361,9 @@ abstract class DashboardViewModelBase with Store {
ReactionDisposer? _onMoneroBalanceChangeReaction; ReactionDisposer? _onMoneroBalanceChangeReaction;
@computed
bool get hasNodes => wallet.type != WalletType.lightning;
@computed @computed
bool get hasPowNodes => wallet.type == WalletType.nano || wallet.type == WalletType.banano; bool get hasPowNodes => wallet.type == WalletType.nano || wallet.type == WalletType.banano;