Disable Lightning across UI surfaces (FeatureFlag.isLightningEnabled = false)

- Add FeatureFlag.isLightningEnabled flag (off)
- Gate dashboard_view_model.hasLightning behind the flag, which transitively
  hides the LightningSwitcher in TopBar and the Lightning Username settings
  row (both already gated on hasLightning)
- Remove CryptoCurrency.btcln from CryptoCurrency.all so it stops appearing
  in any all-currencies pickers/lists

Lightning code paths (cw_bitcoin/lib/lightning/, lightning send/receive
pages) are intentionally left in place so the flag can be flipped back on
once we have an LSP / Greenlight node lined up.
This commit is contained in:
jwinterm
2026-05-14 08:39:55 -04:00
parent 8e24be5d15
commit 6845dc6a8b
3 changed files with 9 additions and 2 deletions
@@ -15,6 +15,7 @@ import 'package:cake_wallet/entities/service_status.dart';
import 'package:cake_wallet/entities/sync_status_display_mode.dart';
import 'package:cake_wallet/exchange/exchange_provider_description.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/utils/feature_flag.dart';
import 'package:cake_wallet/monero/monero.dart';
import 'package:cake_wallet/nano/nano.dart';
import 'package:cake_wallet/order/order_provider_description.dart';
@@ -709,7 +710,10 @@ abstract class DashboardViewModelBase with Store {
@computed
bool get hasLightning =>
wallet.type == WalletType.bitcoin && wallet.isSoftwareWallet && bitcoin!.useLightning(wallet);
FeatureFlag.isLightningEnabled &&
wallet.type == WalletType.bitcoin &&
wallet.isSoftwareWallet &&
bitcoin!.useLightning(wallet);
@computed
bool get hasWalletConnect =>