fix: Restrict Windows platform from using Zcash and Lightning features; update Lightning availability checks. (#3220)

This commit is contained in:
Konstantin Ullrich
2026-05-06 21:40:06 +02:00
committed by GitHub
parent 8e7d4485ac
commit 46064f075a
6 changed files with 18 additions and 10 deletions
+10 -5
View File
@@ -165,12 +165,17 @@ Future<void> runAppWithZone({Key? topLevelKey}) async {
if (FeatureFlag.hasDevOptions) {
ProxyWrapper.logger = MemoryProxyLogger();
}
var zcashPassword = await secureStorageShared.read(key: "com.cakewallet.cw_zcash/zec.db");
if (zcashPassword == null || zcashPassword.isEmpty) {
zcashPassword = generateKey().substring(0, 32);
secureStorageShared.write(key: "com.cakewallet.cw_zcash/zec.db", value: zcashPassword);
if (!Platform.isWindows) {
var zcashPassword = await secureStorageShared.read(
key: "com.cakewallet.cw_zcash/zec.db");
if (zcashPassword == null || zcashPassword.isEmpty) {
zcashPassword = generateKey().substring(0, 32);
secureStorageShared.write(
key: "com.cakewallet.cw_zcash/zec.db", value: zcashPassword);
}
zcash?.unlockDatabase(zcashPassword);
}
zcash?.unlockDatabase(zcashPassword);
// Basically when we're running a test
if (topLevelKey != null) {
@@ -109,7 +109,7 @@ abstract class PrivacySettingsViewModelBase with Store {
bool get canUsePayjoin => _wallet.type == WalletType.bitcoin && DeviceInfo.instance.isMobile;
@computed
bool get canUseLightning => _wallet.type == WalletType.bitcoin;
bool get canUseLightning => _wallet.type == WalletType.bitcoin && !Platform.isWindows;
@computed
bool get useLightning => _wallet.type == WalletType.bitcoin && bitcoin!.useLightning(_wallet);