fixes
This commit is contained in:
@@ -91,13 +91,5 @@ export class App implements OnInit {
|
||||
console.error('Update check failed:', err);
|
||||
}
|
||||
});
|
||||
|
||||
this.swUpdate.versionUpdates
|
||||
.pipe(takeUntilDestroyed(this.destroyRef))
|
||||
.subscribe(event => {
|
||||
if (event.type === 'VERSION_READY') {
|
||||
console.log('New app version ready');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ export class TelegramLoginComponent implements OnDestroy {
|
||||
private pollTimer?: ReturnType<typeof setInterval>;
|
||||
|
||||
constructor() {
|
||||
console.log('TelegramLoginComponent initialized');
|
||||
effect(() => {
|
||||
if (this.showDialog()) {
|
||||
this.initQrLogin();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export interface AuthSession {
|
||||
sessionId: string;
|
||||
userId: any;
|
||||
userId: number | null;
|
||||
username: string | null;
|
||||
displayName: string;
|
||||
active: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, computed, ChangeDetectionStrategy, signal, OnDestroy, inject } from '@angular/core';
|
||||
import { Component, ChangeDetectionStrategy, signal, OnDestroy, inject } from '@angular/core';
|
||||
import { DecimalPipe } from '@angular/common';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
@@ -65,7 +65,6 @@ export class CartComponent implements OnDestroy {
|
||||
private router: Router,
|
||||
private langService: LanguageService
|
||||
) {
|
||||
console.log('CartComponent initialized');
|
||||
this.items = this.cartService.items;
|
||||
this.itemCount = this.cartService.itemCount;
|
||||
this.totalPrice = this.cartService.totalPrice;
|
||||
@@ -233,7 +232,6 @@ export class CartComponent implements OnDestroy {
|
||||
}
|
||||
|
||||
startPolling(): void {
|
||||
console.log('Starting payment status polling CART');
|
||||
this.stopPolling();
|
||||
if (!this.paymentId()) {
|
||||
this.setPaymentError();
|
||||
@@ -437,9 +435,8 @@ export class CartComponent implements OnDestroy {
|
||||
}
|
||||
|
||||
private getTelegramUserId(): string | null {
|
||||
console.log('Getting Telegram User ID', this.authService.session(), window.Telegram?.WebApp?.initDataUnsafe?.user);
|
||||
const sessionTelegramUserId = this.authService.session()?.userId;
|
||||
if (sessionTelegramUserId) {
|
||||
if (sessionTelegramUserId !== null && sessionTelegramUserId !== undefined) {
|
||||
return sessionTelegramUserId.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -215,8 +215,8 @@ export class AuthService {
|
||||
?? this.readString(this.readFirst(user, ['displayName', 'DisplayName', 'name', 'Name']))
|
||||
const displayName = explicitDisplayName ?? username ?? (fullName || 'Telegram User');
|
||||
const telegramUserId = this.readNumber(this.readFirst(user, ['userId','telegramUserId', 'telegramUserID', 'TelegramUserID', 'id', 'ID']))
|
||||
?? this.readNumber(this.readFirst(response, ['telegramUserId', 'telegramUserID', 'TelegramUserID', 'userID', 'UserID', 'UserId']))
|
||||
?? 0;
|
||||
?? this.readNumber(this.readFirst(response, ['userId', 'telegramUserId', 'telegramUserID', 'TelegramUserID', 'userID', 'UserID', 'UserId']))
|
||||
?? null;
|
||||
const expiresAt = this.readString(this.readFirst(response, ['expiresAt', 'ExpiresAt', 'expires', 'Expires']))
|
||||
?? new Date(Date.now() + WEB_SESSION_COOKIE_MAX_AGE_SECONDS * 1000).toISOString();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user