feat: detect telegram notif is enabled or no

This commit is contained in:
2026-05-03 17:12:38 +02:00
parent 387986d6f5
commit 812cf00cef
2 changed files with 684 additions and 172 deletions
+4
View File
@@ -786,6 +786,7 @@ export interface PublicSettings {
crypto_payment_enabled: boolean; crypto_payment_enabled: boolean;
crypto_only: boolean; crypto_only: boolean;
nowpayments_currencies: string[]; nowpayments_currencies: string[];
telegram_notifications_enabled: boolean;
} }
export const getPublicSettings = async (): Promise<PublicSettings> => { export const getPublicSettings = async (): Promise<PublicSettings> => {
@@ -799,6 +800,7 @@ export const getPublicSettings = async (): Promise<PublicSettings> => {
crypto_payment_enabled: false, crypto_payment_enabled: false,
crypto_only: false, crypto_only: false,
nowpayments_currencies: [], nowpayments_currencies: [],
telegram_notifications_enabled: false,
}; };
try { try {
const { data } = await apiClient.get(`${V1}/app-settings`); const { data } = await apiClient.get(`${V1}/app-settings`);
@@ -817,6 +819,8 @@ export const getPublicSettings = async (): Promise<PublicSettings> => {
nowpayments_currencies: Array.isArray(data.nowpayments_currencies) nowpayments_currencies: Array.isArray(data.nowpayments_currencies)
? data.nowpayments_currencies ? data.nowpayments_currencies
: [], : [],
telegram_notifications_enabled:
data.telegram_notifications_enabled ?? false,
}; };
} catch { } catch {
return defaults; return defaults;
File diff suppressed because it is too large Load Diff