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