mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
fix: Restrict Windows platform from using Zcash and Lightning features; update Lightning availability checks. (#3220)
This commit is contained in:
+10
-5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user