Skip to content

Commit

Permalink
Merge branch 'master' into kate/ts_migration_trader_package
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-deriv committed Jun 28, 2023
2 parents 429f683 + c6447b2 commit 204ec93
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 43 deletions.
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
17 changes: 8 additions & 9 deletions packages/cfd/src/Stores/Modules/CFD/cfd-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ 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();
}
}
);
// reaction(
// () => [this.root_store.client.dxtrade_accounts_list],
// () => {
// if (this.root_store.client.dxtrade_accounts_list.length > 0) {
// this.loadDxtradeTokens();
// }
// }
// );

reaction(
() => [this.root_store.client.derivez_accounts_list],
Expand Down Expand Up @@ -691,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 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

0 comments on commit 204ec93

Please sign in to comment.