mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-03 12:24:19 +01:00
fix: Restrict Windows platform from using Zcash and Lightning features; update Lightning availability checks. (#3220)
This commit is contained in:
@@ -100,7 +100,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
||||
// String sideDerivationPath = derivationPath.substring(0, derivationPath.length - 1) + "1";
|
||||
// final hd = bitcoin.HDWallet.fromSeed(seedBytes, network: networkType);
|
||||
|
||||
if (mnemonic != null && this.useLightning) {
|
||||
if (mnemonic != null && this.useLightning && LightningWallet.isAvailable) {
|
||||
try {
|
||||
lightningWallet = LightningWallet(
|
||||
mnemonic: mnemonic,
|
||||
@@ -142,7 +142,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
||||
});
|
||||
|
||||
reaction((_) => this.useLightning, (bool useLightning) {
|
||||
if (useLightning) {
|
||||
if (useLightning && LightningWallet.isAvailable) {
|
||||
if (mnemonic != null) {
|
||||
lightningWallet = LightningWallet(
|
||||
mnemonic: mnemonic,
|
||||
|
||||
@@ -33,9 +33,11 @@ class LightningWallet {
|
||||
required this.apiKey,
|
||||
required this.lnurlDomain,
|
||||
this.network = Network.mainnet,
|
||||
this.cachedAddress
|
||||
this.cachedAddress,
|
||||
});
|
||||
|
||||
static bool get isAvailable => Platform.isIOS || Platform.isAndroid || Platform.isMacOS;
|
||||
|
||||
StreamSubscription<SdkEvent>? _eventSubscription;
|
||||
Stream<SdkEvent>? _eventStream;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user