Remove deprecated updateWalletBalance method from AuthService

- Eliminated the deprecated updateWalletBalance method from AuthService, which redirected calls to PaymentService for wallet balance updates.
- This change streamlines the codebase by removing outdated functionality and encourages the use of the new PaymentService method for better maintainability.

These updates contribute to a cleaner architecture and improved service consistency.
This commit is contained in:
padreug 2025-09-18 09:28:45 +02:00
parent f93058add2
commit 832bf4d4ca

View file

@ -2,7 +2,6 @@
import { ref, computed } from 'vue'
import { BaseService } from '@/core/base/BaseService'
import { eventBus } from '@/core/event-bus'
import { tryInjectService, SERVICE_TOKENS } from '@/core/di-container'
import type { LoginCredentials, RegisterData, User } from '@/lib/api/lnbits'
export class AuthService extends BaseService {
@ -134,19 +133,6 @@ export class AuthService extends BaseService {
await this.checkAuth()
}
/**
* @deprecated Use PaymentService.updateWalletBalance() instead
* This method will be removed in a future version
*/
updateWalletBalance(balanceMsat: number, walletId?: string): void {
console.warn('AuthService.updateWalletBalance is deprecated. Use PaymentService.updateWalletBalance() instead')
// For backwards compatibility, delegate to PaymentService if available
const paymentService = tryInjectService(SERVICE_TOKENS.PAYMENT_SERVICE) as any
if (paymentService?.updateWalletBalance) {
paymentService.updateWalletBalance(balanceMsat, walletId)
}
}
async initialize(): Promise<void> {
// Call BaseService initialize first to inject dependencies