ccpndition

This commit is contained in:
sdarbinyan
2026-05-14 18:27:15 +04:00
parent 60ccdacc63
commit 5d58a387ca

View File

@@ -150,7 +150,8 @@ export class FastcheckPage {
// default fallback. The Pay button is gated on this — without a real // default fallback. The Pay button is gated on this — without a real
// partner id we never call /settings and always show the Telegram button. // partner id we never call /settings and always show the Telegram button.
const idParam = params.get('id'); const idParam = params.get('id');
const isRealId = !!idParam && idParam !== this.defaultPartnerId; const hasIdParam = !!idParam;
const isRealId = hasIdParam && idParam !== this.defaultPartnerId;
this.partnerId.set(idParam ?? this.defaultPartnerId); this.partnerId.set(idParam ?? this.defaultPartnerId);
this.hasPartnerId.set(isRealId); this.hasPartnerId.set(isRealId);
@@ -165,11 +166,10 @@ export class FastcheckPage {
if (digits.length === 18) this.lookupFastcheck(masked); if (digits.length === 18) this.lookupFastcheck(masked);
} }
// Call /settings on every load when we have a real partner id — it may // Call /settings whenever URL has ?id=... (including the default id)
// return active check data to autofill, telegramID, and callbackurl. // so QR-return flows can still autofill data and callback fields.
// Without a real id we skip the request entirely: no Pay button can be // Pay button visibility remains gated by hasPartnerId (real id only).
// shown anyway and we don't want a wasted call against the default id. if (hasIdParam) {
if (isRealId) {
this.loadSettings(!!created || !!iidParam); this.loadSettings(!!created || !!iidParam);
} else { } else {
this.settingsLoaded.set(true); this.settingsLoaded.set(true);