Skip to content

Commit 4fdd076

Browse files
authored
Fix circular dependency crash: add missing forwardRef (#154)
MonitoringService and LightningWalletService have a circular dependency. PR #148 added forwardRef only on the MonitoringService side. The missing forwardRef on LightningWalletService caused the app to crash on startup (503).
1 parent f267f72 commit 4fdd076

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/subdomains/user/application/services/lightning-wallet.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Injectable, NotFoundException } from '@nestjs/common';
1+
import { forwardRef, Inject, Injectable, NotFoundException } from '@nestjs/common';
22
import { Config } from 'src/config/config';
33
import {
44
LnBitsTransactionDto,
@@ -46,6 +46,7 @@ export class LightningWalletService {
4646
constructor(
4747
readonly lightningService: LightningService,
4848
readonly lnbitsWebHookService: LnbitsWebHookService,
49+
@Inject(forwardRef(() => MonitoringService))
4950
private readonly monitoringService: MonitoringService,
5051
private readonly assetService: AssetService,
5152
private readonly lightningTransactionService: LightningTransactionService,

0 commit comments

Comments
 (0)