Skip to content

Commit

Permalink
Lightning address: trigger auto-accept for all compatible backends
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Oct 17, 2023
1 parent 28dbb85 commit 2b6aa20
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions views/Wallet/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,24 +375,6 @@ export default class Wallet extends React.Component<WalletProps, WalletState> {
if (SettingsStore.settings.automaticDisasterRecoveryBackup)
ChannelBackupStore.initSubscribeChannelEvents();
}

if (
lightningAddress.enabled &&
BackendUtils.supportsCustomPreimages() &&
!NodeInfoStore.testnet
) {
LightningAddressStore.status();

if (lightningAddress.automaticallyAccept) {
LightningAddressStore.prepareToAutomaticallyAccept();
}

if (
SettingsStore.settings.lightningAddress?.notifications === 1
) {
LightningAddressStore.updatePushCredentials();
}
}
} else if (implementation === 'lndhub') {
if (connecting) {
await login({ login: username, password }).then(async () => {
Expand Down Expand Up @@ -424,6 +406,22 @@ export default class Wallet extends React.Component<WalletProps, WalletState> {
ChannelsStore.getChannels();
}

if (
lightningAddress.enabled &&
BackendUtils.supportsCustomPreimages() &&
!NodeInfoStore.testnet
) {
LightningAddressStore.status();

if (lightningAddress.automaticallyAccept) {
LightningAddressStore.prepareToAutomaticallyAccept();
}

if (SettingsStore.settings.lightningAddress?.notifications === 1) {
LightningAddressStore.updatePushCredentials();
}
}

if (connecting) {
setConnectingStatus(false);
}
Expand Down

0 comments on commit 2b6aa20

Please sign in to comment.