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

Commit 7aca9bd

Browse files
Merge branch 'master' into remove_ctyptocurrency_market
2 parents c98072d + 6aafbf1 commit 7aca9bd

File tree

42 files changed

+501
-20082
lines changed

Some content is hidden

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

42 files changed

+501
-20082
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: 4 additions & 4 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',
@@ -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',
@@ -601,6 +599,7 @@ module.exports = [
601599
'This contract is only available on [_1]DTrader[_2].',
602600
'This contract lost',
603601
'This contract won',
602+
'This feature is available to virtual accounts only.',
604603
'This feature is not relevant to virtual-money accounts.',
605604
'This field is required.',
606605
'This is a staging server - For testing purposes only',
@@ -609,6 +608,7 @@ module.exports = [
609608
'This is a very common password',
610609
'This is similar to a commonly used password',
611610
'This is your [_1] account.',
611+
'This page is not available in your country of residence.',
612612
'This page is only available to logged out clients.',
613613
'This password is on the blacklist',
614614
'Thursday',
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/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
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
const Url = require('../../../javascript/_common/url.js');
2+
const Client = require('../../app/base/client');
3+
const BinaryPjax = require('../../app/base/binary_pjax');
4+
5+
const DeactivatedAccount = (() => {
6+
const onLoad = () => {
7+
const redirect_home = Url.urlFor('home');
8+
const redirect_trading = Url.urlFor('trading');
9+
setTimeout(() => {
10+
if (Client.isLoggedIn()) {
11+
BinaryPjax.load(redirect_trading);
12+
} else {
13+
BinaryPjax.load(redirect_home);
14+
}
15+
16+
}, 5000);
17+
};
18+
19+
return {
20+
onLoad,
21+
};
22+
})();
23+
24+
module.exports = DeactivatedAccount;

src/sass/_common/common.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ input[type=checkbox] {
380380

381381
.logged_out_title_container {
382382
margin-top: 40px;
383-
margin-bottom: 30px;
383+
margin-bottom: 40px;
384384
}
385385

386386
button .barspinner.white {

src/sass/_common/table.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ table {
6060
&[data-balloon] {
6161
border-bottom: 3px solid $COLOR_LIGHT_GRAY;
6262
}
63+
&.is_empty {
64+
text-align: center;
65+
}
6366
}
6467
.w-80 {
6568
width: 80px;

src/sass/static/pages.scss

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,41 @@ body #not_authenticated_financial ul.checked > li {
16421642
}
16431643
}
16441644

1645+
.deactivated-account-content {
1646+
text-align: center;
1647+
1648+
.close-user-account {
1649+
height: 25vh;
1650+
1651+
.msg_main_modal {
1652+
.notice-msg {
1653+
background-color: transparent;
1654+
height: auto;
1655+
margin: auto;
1656+
1657+
img {
1658+
width: 4rem;
1659+
margin-bottom: 1rem;
1660+
}
1661+
p {
1662+
font-weight: 500;
1663+
}
1664+
h1 {
1665+
@media (max-width: 500px) {
1666+
font-size: 30px;
1667+
}
1668+
}
1669+
@media (max-width: 500px) {
1670+
width: 90%;
1671+
}
1672+
}
1673+
}
1674+
@media (max-width: 500px) {
1675+
margin-bottom: 5rem;
1676+
}
1677+
}
1678+
}
1679+
16451680
.account-closure {
16461681
.notice-msg-wrapper {
16471682
background-color: $COLOR_YELLOW;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react';
2+
3+
const DeactivatedAccount = () => (
4+
<div id='msg_main' className='center-text gr-gutter gr-padding-30 close-user-account'>
5+
<div className='msg_main_modal'>
6+
<div className='notice-msg'>
7+
<img className='responsive' src={it.url_for('images/pages/deactivated_account/lock.svg')} alt='Lock image' />
8+
<h1>
9+
{it.L('We\'re sorry to see you leave.')}
10+
</h1>
11+
<p>
12+
{it.L('Your account is now deactivated.')}
13+
</p>
14+
</div>
15+
</div>
16+
</div>
17+
);
18+
19+
export default DeactivatedAccount;

0 commit comments

Comments
 (0)