Skip to content

Commit

Permalink
Merge branch 'master' into 93000/fix_change_theme_translation_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hamid-deriv authored Jun 30, 2023
2 parents 2ab1ebf + f88bb22 commit afc1ee1
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 115 deletions.
4 changes: 2 additions & 2 deletions packages/appstore/src/components/cfds-listing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ const CFDsListing = () => {
)}

{/* TODO: remove is_real flag to unblock the flow for derivez real account creation */}
{is_landing_company_loaded && !is_real
{/* {is_landing_company_loaded && !is_real
? available_derivez_accounts?.map((account: AvailableAccount) => {
const existing_accounts = getExistingAccounts(account.platform, account.market_type);
const has_existing_accounts = existing_accounts.length > 0;
Expand Down Expand Up @@ -342,7 +342,7 @@ const CFDsListing = () => {
/>
);
})
: !is_real && <PlatformLoader />}
: !is_real && <PlatformLoader />} */}
</ListingContainer>
);
};
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ const StaticDashboard = ({
is_financial_last_step={is_financial_last_step}
is_eu_user={is_eu_user}
/>
<StaticCFDAccountManager
{/* <StaticCFDAccountManager
type='Financial'
platform='derivez'
appname={localize('Deriv EZ')}
Expand All @@ -580,7 +580,7 @@ const StaticDashboard = ({
is_blurry={is_blurry}
is_onboarding_animated={is_onboarding_animated}
is_eu_user={is_eu_user}
/>
/> */}
</div>
)}
</div>
Expand Down
40 changes: 7 additions & 33 deletions packages/bot-skeleton/src/services/api/api-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ let dataDogEnv = '';

if (isProduction) {
dataDogVersion = `deriv-app-${process.env.CIRCLE_TAG}`;
dataDogSessionSampleRate = +process.env.DATADOG_SESSION_SAMPLE_RATE ?? 10;
dataDogSessionSampleRate = 5;
dataDogEnv = 'production';
} else if (isStaging) {
dataDogVersion = `deriv-app-staging-v${formatDate(new Date(), 'YYYYMMDD')}-${formatTime(Date.now(), 'HH:mm')}`;
dataDogSessionSampleRate = 100;
dataDogSessionSampleRate = 5;
dataDogEnv = 'staging';
}

Expand All @@ -30,41 +30,15 @@ datadogLogs.init({
});

export const REQUESTS = [
'active_symbols',
'authorize',
'balance',
'active_symbols',
'transaction',
'ticks_history',
'forget',
'proposal_open_contract',
'proposal',
'buy',
'exchange_rates',
'trading_times',
'time',
'get_account_status',
'get_settings',
'payout_currencies',
'website_status',
'get_financial_assessment',
'mt5_login_list',
'get_self_exclusion',
'landing_company',
'get_limits',
'paymentagent_list',
'platform',
'trading_platform_available_accounts',
'trading_platform_accounts',
'statement',
'landing_company_details',
'contracts_for',
'residence_list',
'account_security',
'p2p_advertiser_info',
'platform',
'history',
'amount',
'proposal',
'proposal_open_contract',
'run-proposal',
'transaction',
'ticks_history',
];

class APIMiddleware {
Expand Down
2 changes: 1 addition & 1 deletion packages/cfd/src/Helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const getDerivEzWebTerminalLink = (category: string, token?: string) => {
let url = DERIVEZ_URL;

if (token) {
url += `?token=${token}`;
url += `?lang=en&token=${token}`;
}

return url;
Expand Down
30 changes: 14 additions & 16 deletions packages/cfd/src/Stores/Modules/CFD/cfd-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,24 +117,23 @@ export default class CFDStore extends BaseStore {
loadDerivezTokens: action.bound,
});

reaction(
() => [this.root_store.client.dxtrade_accounts_list],
() => {
if (this.root_store.client.dxtrade_accounts_list.length > 0) {
this.loadDxtradeTokens();
}
}
);

// todo: uncomment this once derivez tokens are ready
// reaction(
// () => [this.root_store.client.derivez_accounts_list],
// () => [this.root_store.client.dxtrade_accounts_list],
// () => {
// if (this.root_store.client.derivez_accounts_list.length > 0) {
// this.loadDerivezTokens();
// if (this.root_store.client.dxtrade_accounts_list.length > 0) {
// this.loadDxtradeTokens();
// }
// }
// );

reaction(
() => [this.root_store.client.derivez_accounts_list],
() => {
if (this.root_store.client.derivez_accounts_list.length > 0) {
this.loadDerivezTokens();
}
}
);
}

get account_title() {
Expand Down Expand Up @@ -692,7 +691,6 @@ export default class CFDStore extends BaseStore {
const has_existing_account = this.root_store.client.dxtrade_accounts_list.some(
account => account.account_type === account_type
);

if (!this.dxtrade_tokens[account_type] && has_existing_account) {
WS.getServiceToken(CFD_PLATFORMS.DXTRADE, account_type).then(response =>
this.setDxtradeToken(response, account_type)
Expand All @@ -703,8 +701,8 @@ export default class CFDStore extends BaseStore {

setDerivezToken(response, server) {
if (!response.error) {
const { derivez } = response.service_token;
this.derivez_tokens[server] = derivez.token;
const { pandats } = response.service_token;
this.derivez_tokens[server] = pandats.token;
}
}

Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/Services/socket-general.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ const BinarySocketGeneral = (() => {
) {
return;
}
if (!['reset_password'].includes(msg_type)) {
if (window.TrackJS) window.TrackJS.track('Custom InvalidToken error');
}
// eslint-disable-next-line no-case-declarations
const active_platform = getActivePlatform(common_store.app_routing_history);

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/_common/base/socket_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ const BinarySocketBase = (() => {
let temp_service = platform;
if (platform === CFD_PLATFORMS.DERIVEZ) temp_service = 'pandats';

deriv_api.send({
return deriv_api.send({
service_token: 1,
service: temp_service,
server,
Expand Down
2 changes: 1 addition & 1 deletion packages/p2p/src/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
"-1088454544": "Holen Sie sich einen neuen Link",
"-2124584325": "Wir haben deine Bestellung verifiziert",
"-848068683": "Klicken Sie auf den Link in der E-Mail, die wir Ihnen gesendet haben, um diese Transaktion zu autorisieren.",
"-1238182882": "Der Link läuft in 10 Minuten ab.",
"-1238182882": "Der Link wird in 10 Minuten ablaufen.",
"-142727028": "Die E-Mail befindet sich in Ihrem Spam-Ordner (manchmal gehen dort Dinge verloren).",
"-227512949": "Überprüfe deine Rechtschreibung oder verwende einen anderen Begriff.",
"-1554938377": "Zahlungsmethode suchen",
Expand Down
1 change: 1 addition & 0 deletions packages/stores/src/mockStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const mock = (): TStores & { is_mock: boolean } => {
is_deposit_lock: false,
is_dxtrade_allowed: false,
is_eu: false,
is_eu_country: false,
is_financial_account: false,
is_financial_information_incomplete: false,
is_low_risk: false,
Expand Down
1 change: 1 addition & 0 deletions packages/stores/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ type TNotification =

type TClientStore = {
accounts: { [k: string]: TActiveAccount };
is_eu_country: boolean;
active_accounts: TActiveAccount[];
active_account_landing_company: string;
trading_platform_available_accounts: TTradingPlatformAvailableAccount[];
Expand Down

0 comments on commit afc1ee1

Please sign in to comment.