mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-28 06:28:41 +01:00
Keep Enable Lightning toggle visible after disabling it (#3702)
This commit is contained in:
@@ -160,9 +160,11 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
||||
lnurlDomain: "cake.cash",
|
||||
cachedAddress: cachedLightningAddress,
|
||||
);
|
||||
walletAddresses.lightningWallet = lightningWallet;
|
||||
walletAddresses.setLightningAddress(walletInfo.name);
|
||||
}
|
||||
} else {
|
||||
lightningWallet?.close();
|
||||
lightningWallet = null;
|
||||
}
|
||||
});
|
||||
@@ -426,7 +428,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
||||
bool get hasPayjoinSupport => keys.privateKey.isNotEmpty;
|
||||
|
||||
@override
|
||||
bool get hasLightningSupport => lightningWallet?.sdk != null;
|
||||
bool get hasLightningSupport => seed != null && LightningWallet.isAvailable;
|
||||
|
||||
bool get isPayjoinAvailable => unspentCoinsInfo.values
|
||||
.where((element) => element.walletId == id && element.isSending && !element.isFrozen)
|
||||
@@ -727,7 +729,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
||||
|
||||
if (option == BitcoinReceivePageOption.lightning) {
|
||||
// Lightning is tied to the primary account only
|
||||
return !isExtraAccount && hasLightningSupport;
|
||||
return !isExtraAccount && hasLightningSupport && isLightningInitialized;
|
||||
}
|
||||
|
||||
if (option == BitcoinReceivePageOption.silent_payments) {
|
||||
|
||||
@@ -171,7 +171,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
|
||||
final Bip32Slip10Secp256k1 legacyMainHd;
|
||||
final Bip32Slip10Secp256k1 legacySideHd;
|
||||
final bool isHardwareWallet;
|
||||
final LightningWallet? lightningWallet;
|
||||
LightningWallet? lightningWallet;
|
||||
|
||||
@observable
|
||||
ObservableMap<BitcoinAddressType, String> lockedReceiveAddressByType;
|
||||
|
||||
Reference in New Issue
Block a user