Skip to content

Commit

Permalink
isLightningReadyToReceive: quit calling getNodeInfo once synced to chain
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Nov 27, 2023
1 parent 9000e22 commit d585a41
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stores/NodeInfoStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ export default class NodeInfoStore {
@action
public isLightningReadyToReceive = async () => {
await this.channelsStore.getChannels();
await this.getNodeInfo();
const syncedToChain = this.nodeInfo?.synced_to_chain;
let syncedToChain = this.nodeInfo?.synced_to_chain;
if (!syncedToChain) {
await this.getNodeInfo();
syncedToChain = this.nodeInfo?.synced_to_chain;
}

return (
syncedToChain &&
Expand Down

0 comments on commit d585a41

Please sign in to comment.