Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit e4e809c

Browse files
authored
Merge branch 'master' into deriv-banner-token
2 parents 5566597 + 6aafbf1 commit e4e809c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1712
-22118
lines changed

package-lock.json

Lines changed: 21 additions & 19767 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@
109109
"ws": "7.0.0"
110110
},
111111
"dependencies": {
112-
"@binary-com/binary-document-uploader": "^2.4.4",
112+
"@binary-com/binary-document-uploader": "^2.4.6",
113113
"@binary-com/binary-style": "^0.2.25",
114-
"@binary-com/webtrader-charts": "0.5.18",
114+
"@binary-com/webtrader-charts": "0.5.19",
115115
"@deriv/dashboard": "0.0.4",
116116
"@deriv/p2p": "^0.5.1",
117117
"@livechat/customer-sdk": "^2.0.4",

scripts/config/pages.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ module.exports = [
7272

7373
// ==================== Section: "static" ====================
7474
['404', 'static/404', 'full_width', '404'],
75+
['deactivated-account', 'static/deactivated_account', 'full_width', 'Account Deactivated'],
7576
['home', 'static/home', 'full_width', 'Online trading platform for binary options on forex, stock indices, commodities and Synthetic indices'],
7677
['keep-safe', 'static/keep_safe', 'full_width', 'Keep Safe'],
7778
['tour', 'static/tour', 'full_width', 'Tour'],

scripts/js_texts/extracted_strings_app.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ module.exports = [
5656
'Binance USD',
5757
'Binary Coin',
5858
'Binary Password Reset',
59+
'Binary options trading is not available in your country.',
60+
'Binary options trading is not available in your financial account.',
5961
'Binary password',
6062
'Bitcoin',
6163
'Blurry photo detected',
@@ -404,20 +406,19 @@ module.exports = [
404406
'Please ensure that you have the Telegram app installed on your device.',
405407
'Please enter a valid Login ID.',
406408
'Please enter a valid phone number (e.g. +15417541234).',
409+
'Please enter no more than [_1] characters for both fields.',
407410
'Please note that the selected currency is allowed for limited accounts only.',
408411
'Please reapply once the required criteria has been fulfilled.',
409412
'Please reload the page',
410413
'Please select',
411414
'Please select a country',
412-
'Please select a reason.',
413415
'Please select a valid time.',
414416
'Please select at least one scope',
415417
'Please select the checkbox.',
416418
'Please select the currency for this account:',
417419
'Please set [_1]country of residence[_2] before upgrading to a real-money account.',
418420
'Please set the [_1]currency[_2] of your account.',
419421
'Please set your [_1]30-day turnover limit[_2] to remove deposit limits.',
420-
'Please specify the reasons for closing your accounts',
421422
'Please submit your [_1]proof of address[_2].',
422423
'Please submit your [_1]proof of identity and proof of address[_2].',
423424
'Please submit your [_1]proof of identity[_2].',
@@ -455,6 +456,7 @@ module.exports = [
455456
'Refresh',
456457
'Refresh this page to restart the identity verification process',
457458
'Remaining Time',
459+
'Remaining characters: [_1].',
458460
'Remember to press stop when you\'re done. <fallback>Redo video actions</fallback>',
459461
'Remove your glasses, if necessary',
460462
'Repeats like "aaa" are easy to guess',
@@ -525,13 +527,9 @@ module.exports = [
525527
'Sorry, account signup is not available in your country.',
526528
'Sorry, an error occurred while processing your account.',
527529
'Sorry, an error occurred while processing your request.',
528-
'Sorry, but binary options trading is not available in your country.',
529-
'Sorry, but binary options trading is not available in your financial account.',
530530
'Sorry, deposits for this currency are currently disabled.',
531531
'Sorry, no mobile phone bills',
532-
'Sorry, this feature is available to virtual accounts only.',
533532
'Sorry, this feature is not available in your jurisdiction.',
534-
'Sorry, this page is not available in your country of residence.',
535533
'Sorry, withdrawals for this currency are currently disabled.',
536534
'Spot',
537535
'Spot Time',
@@ -589,7 +587,6 @@ module.exports = [
589587
'The link only works on mobile devices',
590588
'The maximum number of tokens ([_1]) has been reached.',
591589
'The photo should clearly show your document',
592-
'The reason should be between 5 and 250 characters',
593590
'The reset time is [_1]',
594591
'The server <a href="[_1]">endpoint</a> is: [_2]',
595592
'The two passwords that you entered do not match.',
@@ -602,6 +599,7 @@ module.exports = [
602599
'This contract is only available on [_1]DTrader[_2].',
603600
'This contract lost',
604601
'This contract won',
602+
'This feature is available to virtual accounts only.',
605603
'This feature is not relevant to virtual-money accounts.',
606604
'This field is required.',
607605
'This is a staging server - For testing purposes only',
@@ -610,6 +608,7 @@ module.exports = [
610608
'This is a very common password',
611609
'This is similar to a commonly used password',
612610
'This is your [_1] account.',
611+
'This page is not available in your country of residence.',
613612
'This page is only available to logged out clients.',
614613
'This password is on the blacklist',
615614
'Thursday',
@@ -789,8 +788,6 @@ module.exports = [
789788
'[_1] withdrawal from account number [_2] to [_3] is done. Transaction ID: [_4]',
790789
'[_1]Manage your accounts[_2]',
791790
'[_1]No, change my fiat account\'s currency now[_2]',
792-
'account',
793-
'accounts',
794791
'back',
795792
'close',
796793
'day',
Lines changed: 1 addition & 0 deletions
Loading

src/javascript/_autogenerated/ach.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/es.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/fr.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/id.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/it.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/pl.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/pt.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/ru.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/vi.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/zh_cn.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_autogenerated/zh_tw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/_common/base/login.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ const getLanguage = require('../language').get;
44
const isMobile = require('../os_detect').isMobile;
55
const isStorageSupported = require('../storage').isStorageSupported;
66
const LocalStore = require('../storage').LocalStore;
7+
const removeCookies = require('../storage').removeCookies;
78
const urlForCurrentDomain = require('../url').urlForCurrentDomain;
89
const isLoginPages = require('../utility').isLoginPages;
910
const TrafficSource = require('../../app/common/traffic_source');
1011
const getAppId = require('../../config').getAppId;
1112

1213
const Login = (() => {
1314
const redirectToLogin = (reset_password) => {
14-
if ((!Client.isLoggedIn() && !isLoginPages() && isStorageSupported(sessionStorage)) || reset_password) {
15+
removeCookies('hide_guide');
16+
if (!Client.isLoggedIn() && !isLoginPages() && isStorageSupported(sessionStorage) || reset_password) {
1517
sessionStorage.setItem('redirect_url', window.location.href);
1618
window.location.href = loginUrl();
1719
}

src/javascript/app/base/binary_loader.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ const BinaryLoader = (() => {
102102

103103
const error_messages = {
104104
login : () => localize('Please [_1]log in[_2] or [_3]sign up[_4] to view this page.', [`<a href="${'javascript:;'}">`, '</a>', `<a href="${urlFor('new-account')}">`, '</a>']),
105-
only_virtual : () => localize('Sorry, this feature is available to virtual accounts only.'),
105+
only_virtual : () => localize('This feature is available to virtual accounts only.'),
106106
only_real : () => localize('This feature is not relevant to virtual-money accounts.'),
107107
not_authenticated: () => localize('This page is only available to logged out clients.'),
108-
no_mf : () => localize('Sorry, but binary options trading is not available in your financial account.'),
109-
options_blocked : () => localize('Sorry, but binary options trading is not available in your country.'),
110-
residence_blocked: () => localize('Sorry, this page is not available in your country of residence.'),
108+
no_mf : () => localize('Binary options trading is not available in your financial account.'),
109+
options_blocked : () => localize('Binary options trading is not available in your country.'),
110+
residence_blocked: () => localize('This page is not available in your country of residence.'),
111111
};
112112

113113
const loadHandler = (this_page) => {
@@ -148,6 +148,9 @@ const BinaryLoader = (() => {
148148
}
149149
});
150150
}
151+
if (this_page === 'deactivated-account' && Client.isLoggedIn()) {
152+
displayMessage(error_messages.not_deactivated());
153+
}
151154

152155
BinarySocket.wait('authorize').then(() => {
153156
if (config.no_blocked_country && Client.isLoggedIn() && Client.isOptionsBlocked()) {
@@ -181,6 +184,7 @@ const BinaryLoader = (() => {
181184
if (!content) {
182185
return;
183186
}
187+
content.classList.add('container');
184188

185189
const div_container = createElement('div', { class: 'logged_out_title_container', html: Client.isAccountOfType('financial') || Client.isOptionsBlocked() ? '' : content.getElementsByTagName('h1')[0] || '' });
186190
const div_notice = createElement('p', { class: 'center-text notice-msg', html: localized_message });

src/javascript/app/base/binary_pages.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const VideoFacility = require('../pages/user/video_facility');
5555
// const Charity = require('../../static/pages/charity');
5656
const Contact = require('../../static/pages/contact');
5757
// const Contact2 = require('../../static/pages/contact_2');
58+
const DeactivatedAccount = require('../../static/pages/deactivated_account');
5859
const GetStarted = require('../../static/pages/get_started');
5960
const Home = require('../../static/pages/home');
6061
const KeepSafe = require('../../static/pages/keep_safe');
@@ -142,6 +143,7 @@ const pages_config = {
142143
'binary-options' : { module: GetStarted.BinaryOptions },
143144
// 'contact-2' : { module: Contact2 },
144145
'contract-specifications': { module: TabSelector },
146+
'deactivated-account' : { module: DeactivatedAccount },
145147
'get-started' : { module: TabSelector },
146148
'how-to-trade-mt5' : { module: TabSelector },
147149
'ib-faq' : { module: StaticPages.IBProgrammeFAQ },

src/javascript/app/base/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const Client = (() => {
119119

120120
if (response.logout !== 1) return;
121121
removeCookies('login', 'loginid', 'loginid_list', 'email', 'residence', 'settings'); // backward compatibility
122-
removeCookies('reality_check', 'affiliate_token', 'affiliate_tracking', 'onfido_token');
122+
removeCookies('reality_check', 'affiliate_token', 'affiliate_tracking', 'onfido_token', 'hide_guide');
123123
// clear elev.io session storage
124124
sessionStorage.removeItem('_elevaddon-6app');
125125
sessionStorage.removeItem('_elevaddon-6create');

src/javascript/app/common/form_manager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const FormManager = (() => {
5757

5858
fields.forEach((field) => {
5959
if (!field.exclude_request) {
60-
if (field.$.attr('class') === 'hide-product-checkbox' || field.$.is(':visible') || field.value || field.$.attr('data-force')) {
60+
if (field.$.attr('class') === 'hidden-consent-checkbox' || field.$.is(':visible') || field.value || field.$.attr('data-force')) {
6161
val = field.$.val();
6262
key = field.request_field || field.selector;
6363

@@ -68,8 +68,8 @@ const FormManager = (() => {
6868
value = field.$.attr('data-value');
6969
} else if (/lbl_/.test(key)) {
7070
value = field.value || field.$.text();
71-
} else if (field.$.attr('class') === 'hide-product-checkbox') {
72-
value = field.$.attr('class') === 'hide-product-checkbox' ? 1 : 0;
71+
} else if (field.$.attr('class') === 'hidden-consent-checkbox') {
72+
value = field.$.attr('class') === 'hidden-consent-checkbox' ? 1 : 0;
7373
} else if (field.$.is(':checkbox')) {
7474
value = field.$.is(':checked') ? 1 : 0;
7575
} else if (Array.isArray(val)) {

src/javascript/app/common/guide.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ const Guide = (() => {
4646

4747
makeButton();
4848
};
49-
5049
/*
5150
* do not show the guide button if its close (X) has been clicked before
5251
*/

src/javascript/app/pages/user/account/authenticate.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,8 @@ const Authenticate = (() => {
776776
};
777777

778778
const showSuccess = () => {
779-
BinarySocket.send({ get_account_status: 1 }, { forced: true }).then(() => {
779+
BinarySocket.send({ get_account_status: 1 }, { forced: true }).then(response => {
780+
authentication_object = response.get_account_status.authentication;
780781
Header.displayAccountStatus();
781782
removeButtonLoading();
782783
$button.setVisibility(0);
@@ -788,7 +789,8 @@ const Authenticate = (() => {
788789
};
789790

790791
const showSuccessUns = () => {
791-
BinarySocket.send({ get_account_status: 1 }, { forced: true }).then(() => {
792+
BinarySocket.send({ get_account_status: 1 }, { forced: true }).then(response => {
793+
authentication_object = response.get_account_status.authentication;
792794
Header.displayAccountStatus();
793795
removeButtonLoadingUns();
794796
$button_uns.setVisibility(0);
@@ -904,6 +906,9 @@ const Authenticate = (() => {
904906
const type_pending = type === 'identity' ? 'poa' : 'poi';
905907
const description_status = status !== 'verified';
906908

909+
$(`#text_verified_${type_pending}_required, #text_pending_${type_pending}_required`).setVisibility(0);
910+
$(`#button_verified_${type_pending}_required, #button_pending_${type_pending}_required`).setVisibility(0);
911+
907912
if (needs_verification.includes(type)) {
908913
$(`#text_${status}_${type_required}_required`).setVisibility(1);
909914
$(`#button_${status}_${type_required}_required`).setVisibility(1);
@@ -921,7 +926,8 @@ const Authenticate = (() => {
921926
onfido.tearDown();
922927
$('#authentication_loading').setVisibility(1);
923928
setTimeout(() => {
924-
BinarySocket.send({ get_account_status: 1 }, { forced: true }).then(() => {
929+
BinarySocket.send({ get_account_status: 1 }, { forced: true }).then(response => {
930+
authentication_object = response.get_account_status.authentication;
925931
$('#msg_personal_details').setVisibility(0);
926932
$('#upload_complete').setVisibility(1);
927933
Header.displayAccountStatus();

src/javascript/app/pages/user/account/portfolio/portfolio.init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const PortfolioInit = (() => {
5252
const $div = $('<div/>');
5353
$div.append($('<tr/>', { class: `tr-first ${new_class} ${data.contract_id}`, id: data.contract_id })
5454
.append($('<td/>', { class: 'ref' }).append($(`<span ${GetAppDetails.showTooltip(data.app_id, oauth_apps[data.app_id])} data-balloon-position="right">${data.transaction_id}</span>`)))
55-
.append($('<td/>', { class: 'payout' }).append($('<strong/>', { html: +data.payout ? formatMoney(data.currency, data.payout) : '-' })))
55+
.append($('<td/>', { class: `payout ${!data.payout ? 'is_empty' : ''}` }).append($('<strong/>', { html: +data.payout ? formatMoney(data.currency, data.payout) : '-' })))
5656
.append($('<td/>', { class: 'details', text: data.longcode }))
5757
.append($('<td/>', { class: 'purchase' }).append($('<strong/>', { html: formatMoney(data.currency, data.buy_price) })))
5858
.append($('<td/>', { class: 'indicative' }).append($('<strong/>', { class: 'indicative_price', text: '--.--' })))

src/javascript/app/pages/user/account/settings/account_closure.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,7 @@ const AccountClosure = (() => {
181181
}
182182
el_step_2_submit.setAttribute('disabled', false);
183183
} else {
184-
el_submit_loading.setVisibility(0);
185-
showStep(3);
186-
window.scrollTo({ top: 0, behavior: 'smooth' });
187-
188-
sessionStorage.setItem('closingAccount', 1);
189-
setTimeout(() => {
190-
// we need to clear all stored client data by performing a logout action and then redirect to home
191-
// otherwise it will think that client is still logged in and redirect to trading page
192-
Client.sendLogoutRequest(false, Url.urlFor('home'));
193-
}, 10000);
184+
Client.sendLogoutRequest(false, Url.urlFor('deactivated-account'));
194185
}
195186
});
196187
};

0 commit comments

Comments
 (0)