From 8f9c6f30517442c46fe31c721d761c529e7676b2 Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Sat, 14 Feb 2026 20:39:33 +0100 Subject: [PATCH 1/2] Fix typo: rename LightingWalletRepository to LightningWalletRepository The class name was missing the 'n' in Lightning (Lighting vs Lightning). Rename across all files that reference or import it. --- src/subdomains/monitoring/monitoring.module.ts | 4 ++-- src/subdomains/monitoring/services/monitoring.service.ts | 4 ++-- .../application/repositories/lightning-wallet.repository.ts | 2 +- .../user/application/services/lightning-wallet.service.ts | 4 ++-- .../user/application/services/user-boltcard.service.ts | 4 ++-- src/subdomains/user/user.module.ts | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/subdomains/monitoring/monitoring.module.ts b/src/subdomains/monitoring/monitoring.module.ts index e0ee90718..be777fefc 100644 --- a/src/subdomains/monitoring/monitoring.module.ts +++ b/src/subdomains/monitoring/monitoring.module.ts @@ -9,7 +9,7 @@ import { BoltzModule } from '../boltz/boltz.module'; import { AssetModule } from '../master-data/asset/asset.module'; import { PricingModule } from '../pricing/pricing.module'; import { LightningWalletEntity } from '../user/domain/entities/lightning-wallet.entity'; -import { LightingWalletRepository } from '../user/application/repositories/lightning-wallet.repository'; +import { LightningWalletRepository } from '../user/application/repositories/lightning-wallet.repository'; import { MonitoringController } from './controllers/monitoring.controller'; import { MonitoringBalanceEntity } from './entities/monitoring-balance.entity'; import { MonitoringEvmBalanceEntity } from './entities/monitoring-evm-balance.entity'; @@ -38,7 +38,7 @@ import { MonitoringService } from './services/monitoring.service'; MonitoringRepository, MonitoringBalanceRepository, MonitoringEvmBalanceRepository, - LightingWalletRepository, + LightningWalletRepository, MonitoringService, MonitoringEvmService, BalanceAlertService, diff --git a/src/subdomains/monitoring/services/monitoring.service.ts b/src/subdomains/monitoring/services/monitoring.service.ts index dabdd7e95..9c4659478 100644 --- a/src/subdomains/monitoring/services/monitoring.service.ts +++ b/src/subdomains/monitoring/services/monitoring.service.ts @@ -15,7 +15,7 @@ import { QueueHandler } from 'src/shared/utils/queue-handler'; import { AssetService } from 'src/subdomains/master-data/asset/services/asset.service'; import { CoinGeckoService } from 'src/subdomains/pricing/services/coingecko.service'; import { LightningWalletTotalBalanceDto } from 'src/subdomains/user/application/dto/lightning-wallet.dto'; -import { LightingWalletRepository } from 'src/subdomains/user/application/repositories/lightning-wallet.repository'; +import { LightningWalletRepository } from 'src/subdomains/user/application/repositories/lightning-wallet.repository'; import { MonitoringBlockchainBalance } from '../dto/monitoring.dto'; import { MonitoringBalanceEntity } from '../entities/monitoring-balance.entity'; import { MonitoringBalanceRepository } from '../repositories/monitoring-balance.repository'; @@ -39,7 +39,7 @@ export class MonitoringService implements OnModuleInit { private readonly evmRegistryService: EvmRegistryService, private readonly monitoringRepository: MonitoringRepository, private readonly monitoringBalanceRepository: MonitoringBalanceRepository, - private readonly lightingWalletRepository: LightingWalletRepository, + private readonly lightingWalletRepository: LightningWalletRepository, ) { this.bitcoinClient = bitcoinservice.getDefaultClient(); this.lightningClient = lightningService.getDefaultClient(); diff --git a/src/subdomains/user/application/repositories/lightning-wallet.repository.ts b/src/subdomains/user/application/repositories/lightning-wallet.repository.ts index 131e9e05f..fd6a11dd4 100644 --- a/src/subdomains/user/application/repositories/lightning-wallet.repository.ts +++ b/src/subdomains/user/application/repositories/lightning-wallet.repository.ts @@ -5,7 +5,7 @@ import { LightningWalletEntity } from '../../domain/entities/lightning-wallet.en import { LightningWalletTotalBalanceDto } from '../dto/lightning-wallet.dto'; @Injectable() -export class LightingWalletRepository extends BaseRepository { +export class LightningWalletRepository extends BaseRepository { constructor(manager: EntityManager) { super(LightningWalletEntity, manager); } diff --git a/src/subdomains/user/application/services/lightning-wallet.service.ts b/src/subdomains/user/application/services/lightning-wallet.service.ts index d49886471..7d8ad9dfd 100644 --- a/src/subdomains/user/application/services/lightning-wallet.service.ts +++ b/src/subdomains/user/application/services/lightning-wallet.service.ts @@ -25,7 +25,7 @@ import { } from 'src/subdomains/user/domain/entities/user-transaction.entity'; import { LightningWalletEntity } from '../../domain/entities/lightning-wallet.entity'; import { UserTransactionDto } from '../dto/user-transaction.dto'; -import { LightingWalletRepository } from '../repositories/lightning-wallet.repository'; +import { LightningWalletRepository } from '../repositories/lightning-wallet.repository'; import { WalletRepository } from '../repositories/wallet.repository'; interface LightningWalletInfoDto { @@ -51,7 +51,7 @@ export class LightningWalletService { private readonly lightningTransactionService: LightningTransactionService, private readonly paymentRequestService: PaymentRequestService, private readonly userTransactionRepository: UserTransactionRepository, - private readonly lightingWalletRepository: LightingWalletRepository, + private readonly lightingWalletRepository: LightningWalletRepository, private readonly walletRepository: WalletRepository, ) { this.client = lightningService.getDefaultClient(); diff --git a/src/subdomains/user/application/services/user-boltcard.service.ts b/src/subdomains/user/application/services/user-boltcard.service.ts index a769c2d2e..11866e0c3 100644 --- a/src/subdomains/user/application/services/user-boltcard.service.ts +++ b/src/subdomains/user/application/services/user-boltcard.service.ts @@ -7,7 +7,7 @@ import { LightningLogger } from 'src/shared/services/lightning-logger'; import { QueueHandler } from 'src/shared/utils/queue-handler'; import { LightningWalletService } from 'src/subdomains/user/application/services/lightning-wallet.service'; import { UserBoltcardEntity, UserBoltcardStatus } from '../../domain/entities/user-boltcard.entity'; -import { LightingWalletRepository } from '../repositories/lightning-wallet.repository'; +import { LightningWalletRepository } from '../repositories/lightning-wallet.repository'; import { UserBoltcardRepository } from '../repositories/user-boltcard.repository'; import { WalletRepository } from '../repositories/wallet.repository'; @@ -24,7 +24,7 @@ export class UserBoltcardService { readonly lnbitsWebHookService: LnbitsWebHookService, private readonly lightningWalletService: LightningWalletService, private readonly userBoltcardRepository: UserBoltcardRepository, - private readonly lightingWalletRepository: LightingWalletRepository, + private readonly lightingWalletRepository: LightningWalletRepository, private readonly walletRepository: WalletRepository, ) { this.client = lightningService.getDefaultClient(); diff --git a/src/subdomains/user/user.module.ts b/src/subdomains/user/user.module.ts index 329a51bda..a72a254fa 100644 --- a/src/subdomains/user/user.module.ts +++ b/src/subdomains/user/user.module.ts @@ -12,7 +12,7 @@ import { PaymentRequestModule } from '../payment-request/payment-request.module' import { AuthController } from './api/controllers/auth.controller'; import { UserController } from './api/controllers/user.controller'; import { LightningWalletSynchronizeController } from './application/controller/lightning-wallet-sync.controller'; -import { LightingWalletRepository } from './application/repositories/lightning-wallet.repository'; +import { LightningWalletRepository } from './application/repositories/lightning-wallet.repository'; import { UserBoltcardRepository } from './application/repositories/user-boltcard.repository'; import { UserTransactionRepository } from './application/repositories/user-transaction.repository'; import { UserRepository } from './application/repositories/user.repository'; @@ -55,7 +55,7 @@ import { WalletEntity } from './domain/entities/wallet.entity'; UserRepository, WalletProviderRepository, WalletRepository, - LightingWalletRepository, + LightningWalletRepository, UserTransactionRepository, UserBoltcardRepository, AuthService, From 0fbe26964fd2e9fb0475e24e94de240e6a760cca Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Sat, 14 Feb 2026 20:52:09 +0100 Subject: [PATCH 2/2] Also rename lightingWalletRepository property names to lightningWalletRepository The previous commit only renamed the class/type but missed the property and variable names in MonitoringService, LightningWalletService, and UserBoltcardService. --- .../monitoring/services/monitoring.service.ts | 6 +++--- .../application/services/lightning-wallet.service.ts | 12 ++++++------ .../application/services/user-boltcard.service.ts | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/subdomains/monitoring/services/monitoring.service.ts b/src/subdomains/monitoring/services/monitoring.service.ts index 9c4659478..ed70a0776 100644 --- a/src/subdomains/monitoring/services/monitoring.service.ts +++ b/src/subdomains/monitoring/services/monitoring.service.ts @@ -39,7 +39,7 @@ export class MonitoringService implements OnModuleInit { private readonly evmRegistryService: EvmRegistryService, private readonly monitoringRepository: MonitoringRepository, private readonly monitoringBalanceRepository: MonitoringBalanceRepository, - private readonly lightingWalletRepository: LightningWalletRepository, + private readonly lightningWalletRepository: LightningWalletRepository, ) { this.bitcoinClient = bitcoinservice.getDefaultClient(); this.lightningClient = lightningService.getDefaultClient(); @@ -76,8 +76,8 @@ export class MonitoringService implements OnModuleInit { try { const internalWalletIds = Config.blockchain.lightning.lnbits.internalWalletIds; - const internalBalances = await this.lightingWalletRepository.getInternalBalances(internalWalletIds); - const customerBalances = await this.lightingWalletRepository.getCustomerBalances(internalWalletIds); + const internalBalances = await this.lightningWalletRepository.getInternalBalances(internalWalletIds); + const customerBalances = await this.lightningWalletRepository.getCustomerBalances(internalWalletIds); await this.processBalances(internalBalances, customerBalances); await this.processChannels(); diff --git a/src/subdomains/user/application/services/lightning-wallet.service.ts b/src/subdomains/user/application/services/lightning-wallet.service.ts index 7d8ad9dfd..79fcd5f67 100644 --- a/src/subdomains/user/application/services/lightning-wallet.service.ts +++ b/src/subdomains/user/application/services/lightning-wallet.service.ts @@ -51,7 +51,7 @@ export class LightningWalletService { private readonly lightningTransactionService: LightningTransactionService, private readonly paymentRequestService: PaymentRequestService, private readonly userTransactionRepository: UserTransactionRepository, - private readonly lightingWalletRepository: LightningWalletRepository, + private readonly lightningWalletRepository: LightningWalletRepository, private readonly walletRepository: WalletRepository, ) { this.client = lightningService.getDefaultClient(); @@ -64,14 +64,14 @@ export class LightningWalletService { } async getLightningWallet(walletId: string): Promise { - return this.lightingWalletRepository.getByWalletId(walletId); + return this.lightningWalletRepository.getByWalletId(walletId); } async updateLightningWalletBalances(): Promise { const userTransactionBalances = await this.userTransactionRepository.getBalances(); for (const userTransactionBalance of userTransactionBalances) { - await this.lightingWalletRepository.update( + await this.lightningWalletRepository.update( { id: userTransactionBalance.lightningWalletId }, { balance: userTransactionBalance.balance, @@ -81,8 +81,8 @@ export class LightningWalletService { const internalWalletIds = Config.blockchain.lightning.lnbits.internalWalletIds; - const internalBalances = await this.lightingWalletRepository.getInternalBalances(internalWalletIds); - const customerBalances = await this.lightingWalletRepository.getCustomerBalances(internalWalletIds); + const internalBalances = await this.lightningWalletRepository.getInternalBalances(internalWalletIds); + const customerBalances = await this.lightningWalletRepository.getCustomerBalances(internalWalletIds); await this.monitoringService.processBalanceMonitoring(internalBalances, customerBalances); } @@ -110,7 +110,7 @@ export class LightningWalletService { ...(await this.getUserTransactionEntities(lightningWalletInfo, startDate, endDate, withBalance)), ); } else { - const lightningWalletIterator = this.lightingWalletRepository.getRawIterator( + const lightningWalletIterator = this.lightningWalletRepository.getRawIterator( 100, 'id AS lightningWalletId, lnbitsWalletId, adminKey, assetId AS accountAssetId', ); diff --git a/src/subdomains/user/application/services/user-boltcard.service.ts b/src/subdomains/user/application/services/user-boltcard.service.ts index 11866e0c3..aa9949a1c 100644 --- a/src/subdomains/user/application/services/user-boltcard.service.ts +++ b/src/subdomains/user/application/services/user-boltcard.service.ts @@ -24,7 +24,7 @@ export class UserBoltcardService { readonly lnbitsWebHookService: LnbitsWebHookService, private readonly lightningWalletService: LightningWalletService, private readonly userBoltcardRepository: UserBoltcardRepository, - private readonly lightingWalletRepository: LightningWalletRepository, + private readonly lightningWalletRepository: LightningWalletRepository, private readonly walletRepository: WalletRepository, ) { this.client = lightningService.getDefaultClient(); @@ -89,7 +89,7 @@ export class UserBoltcardService { } } } else { - const lightningWalletIterator = this.lightingWalletRepository.getRawIterator<{ adminKey: string }>( + const lightningWalletIterator = this.lightningWalletRepository.getRawIterator<{ adminKey: string }>( 100, 'adminKey', );