Align DEFAULT_NOTIFY_API_SERVER with other backend service defaults.

Drop getDefaultNotifyApiServer and the Endorser-based fallback so notify
config uses the same env-or-prod pattern as image, partner, and push.
This commit is contained in:
Jose Olarte III
2026-07-22 17:39:48 +08:00
parent 0ecd4c6dd7
commit 25110e3eea

View File

@@ -50,6 +50,12 @@ export const DEFAULT_PARTNER_API_SERVER =
export const DEFAULT_PUSH_SERVER =
import.meta.env.VITE_DEFAULT_PUSH_SERVER || AppString.PROD_PUSH_SERVER;
export const DEFAULT_NOTIFY_API_SERVER =
import.meta.env.VITE_DEFAULT_NOTIFY_API_SERVER ||
AppString.PROD_NOTIFY_API_SERVER;
export const IMAGE_TYPE_PROFILE = "profile";
/**
* True when the current API server is not production (test/local build).
* Use this to show dev/test-only UI (e.g. 10-minute rollover toggle, test user mnemonic).
@@ -57,27 +63,6 @@ export const DEFAULT_PUSH_SERVER =
export function isNotProdServer(apiServer: string): boolean {
return apiServer !== AppString.PROD_ENDORSER_API_SERVER;
}
/**
* Default Notification API base URL for the given Endorser API server.
* Prefers VITE_DEFAULT_NOTIFY_API_SERVER when set; otherwise prod vs test/local
* follows the same isNotProdServer logic used elsewhere.
*/
export function getDefaultNotifyApiServer(apiServer: string): string {
return (
import.meta.env.VITE_DEFAULT_NOTIFY_API_SERVER ||
(isNotProdServer(apiServer)
? AppString.TEST_NOTIFY_API_SERVER
: AppString.PROD_NOTIFY_API_SERVER)
);
}
export const DEFAULT_NOTIFY_API_SERVER = getDefaultNotifyApiServer(
DEFAULT_ENDORSER_API_SERVER,
);
export const IMAGE_TYPE_PROFILE = "profile";
export const SUPPORT_EMAIL = "info@TimeSafari.app";
export const PASSKEYS_ENABLED =