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:
parent
f93058add2
commit
832bf4d4ca
1 changed files with 0 additions and 14 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { BaseService } from '@/core/base/BaseService'
|
import { BaseService } from '@/core/base/BaseService'
|
||||||
import { eventBus } from '@/core/event-bus'
|
import { eventBus } from '@/core/event-bus'
|
||||||
import { tryInjectService, SERVICE_TOKENS } from '@/core/di-container'
|
|
||||||
import type { LoginCredentials, RegisterData, User } from '@/lib/api/lnbits'
|
import type { LoginCredentials, RegisterData, User } from '@/lib/api/lnbits'
|
||||||
|
|
||||||
export class AuthService extends BaseService {
|
export class AuthService extends BaseService {
|
||||||
|
|
@ -134,19 +133,6 @@ export class AuthService extends BaseService {
|
||||||
await this.checkAuth()
|
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> {
|
async initialize(): Promise<void> {
|
||||||
// Call BaseService initialize first to inject dependencies
|
// Call BaseService initialize first to inject dependencies
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue