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

Commit 1b80d95

Browse files
authored
Kevin/Account closure peding withdrawal(s) error message (#6620)
* account closure * fix circleci * add localize on translateable sentence(s)
1 parent 639be78 commit 1b80d95

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ const AccountClosure = (() => {
221221
};
222222
if (response.error.details.open_positions) {
223223
Object.keys(response.error.details.open_positions).forEach((account) => {
224-
const txt_positions = `${response.error.details.open_positions[account]} position(s)`;
224+
const txt_positions = `${response.error.details.open_positions[account]} ${localize('position(s)')}`;
225225
if (/^MT/.test(account)) {
226226
section_id = 'account_closure_open_mt';
227227
display_name = getMTDisplay(account);
@@ -245,6 +245,13 @@ const AccountClosure = (() => {
245245
addSection(account, txt_balance);
246246
});
247247
}
248+
if (response.error.details.pending_withdrawals) {
249+
Object.keys(response.error.details.pending_withdrawals).forEach((account) => {
250+
const txt_pending_withdrawals = `${response.error.details.pending_withdrawals[account]} ${localize('withdrawal(s)')}`;
251+
section_id = 'account_closure_pending_withdrawals';
252+
addSection(account, txt_pending_withdrawals);
253+
});
254+
}
248255
};
249256

250257
const showFormMessage = (localized_msg) => {

src/templates/app/user/security/account_closure.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ const AccountClosureError = () => (
5151
<div className='gr-padding-20 gr-parent invisible' id='account_closure_balance_mt'>
5252
{it.L('You have funds in these MT5 accounts:')}
5353
</div>
54+
<div className='gr-padding-20 gr-parent invisible' id='account_closure_pending_withdrawals'>
55+
{it.L('You have pending withdrawal(s) in these Binary accounts:')}
56+
</div>
5457
</div>
5558
<div id='account_closure_error_buttons' className='gr-padding-10 gr-child'>
5659
<button className='modal-back back button no-margin'>{it.L('OK')}</button>

0 commit comments

Comments
 (0)