diff --git a/src/utils/__tests__/utils.test.ts b/src/utils/__tests__/utils.test.ts index 48c85732..366f8e61 100644 --- a/src/utils/__tests__/utils.test.ts +++ b/src/utils/__tests__/utils.test.ts @@ -31,7 +31,7 @@ describe('Get App ID', () => { it('By default it should return vercel staging ap id if hostname is not listed', () => { window.location.hostname = 'asdfasdf'; const appId = getAppId(); - expect(appId).toBe('35073'); + expect(appId).toBe('36544'); }); it("Should return 35074 when it's called in localhost environment", () => { window.location.hostname = 'localhost'; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 7059e498..590cd813 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -2,6 +2,11 @@ export const PRODUCTION_APP_ID = '36544'; export const STAGING_APP_ID = '36545'; export const VERCEL_DEPLOYMENT_APP_ID = '35073'; export const LOCALHOST_APP_ID = '35074'; +export const PRODUCTION_ME_APP_ID = '61569' +export const PRODUCTION_BE_APP_ID = '61570' +export const STAGING_ME_APP_ID = '61571' +export const STAGING_BE_APP_ID = '61572' + export const DEFAULT_WS_SERVER = 'ws.derivws.com'; export const OAUTH_URL = 'oauth.deriv.com'; diff --git a/src/utils/index.ts b/src/utils/index.ts index aca66f03..f42e566f 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -8,6 +8,10 @@ import { VERCEL_DEPLOYMENT_APP_ID, OAUTH_URL, DEFAULT_WS_SERVER, + PRODUCTION_ME_APP_ID, + PRODUCTION_BE_APP_ID, + STAGING_ME_APP_ID, + STAGING_BE_APP_ID, } from './constants'; const CURRENCY_MAP = new Map([ @@ -86,8 +90,12 @@ export const getAppId = () => { if (isHost('staging-api.deriv.com')) return STAGING_APP_ID; if (isHost('deriv-api-docs.binary.sx')) return VERCEL_DEPLOYMENT_APP_ID; if (isHost('api.deriv.com')) return PRODUCTION_APP_ID; + if (isHost('api.deriv.me')) return PRODUCTION_ME_APP_ID; + if (isHost('api.deriv.be')) return PRODUCTION_BE_APP_ID; + if (isHost('staging-api.deriv.me')) return STAGING_ME_APP_ID; + if (isHost('staging-api.deriv.be')) return STAGING_BE_APP_ID; - return VERCEL_DEPLOYMENT_APP_ID; + return PRODUCTION_APP_ID; }; /**