From 6d577f487fc33af23225dde979c6d45ea1a91aab Mon Sep 17 00:00:00 2001 From: kevinw-binary Date: Fri, 18 Jun 2021 15:38:59 +0800 Subject: [PATCH 1/3] account closure --- .../app/pages/user/account/settings/account_closure.js | 8 ++++++++ src/templates/app/user/security/account_closure.jsx | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/javascript/app/pages/user/account/settings/account_closure.js b/src/javascript/app/pages/user/account/settings/account_closure.js index 430e93d5b9a0c..d31351640b1d7 100644 --- a/src/javascript/app/pages/user/account/settings/account_closure.js +++ b/src/javascript/app/pages/user/account/settings/account_closure.js @@ -245,6 +245,14 @@ const AccountClosure = (() => { addSection(account, txt_balance); }); } + if (response.error.details.pending_withdrawals) { + Object.keys(response.error.details.pending_withdrawals).forEach((account) => { + const txt_pending_withdrawals = `${response.error.details.pending_withdrawals[account]} withdrawal(s)`; + console.log(txt_pending_withdrawals); + section_id = 'account_closure_pending_withdrawals'; + addSection(account, txt_pending_withdrawals); + }); + } }; const showFormMessage = (localized_msg) => { diff --git a/src/templates/app/user/security/account_closure.jsx b/src/templates/app/user/security/account_closure.jsx index ea6db871b5f06..8f4c52d411798 100644 --- a/src/templates/app/user/security/account_closure.jsx +++ b/src/templates/app/user/security/account_closure.jsx @@ -51,6 +51,9 @@ const AccountClosureError = () => (
{it.L('You have funds in these MT5 accounts:')}
+
+ {it.L('You have pending withdrawal(s) in these Binary accounts:')} +
From 02bda63c0185f57854d4a0631c0dee5f83163446 Mon Sep 17 00:00:00 2001 From: kevinw-binary Date: Fri, 18 Jun 2021 17:02:35 +0800 Subject: [PATCH 2/3] fix circleci --- .../app/pages/user/account/settings/account_closure.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/javascript/app/pages/user/account/settings/account_closure.js b/src/javascript/app/pages/user/account/settings/account_closure.js index d31351640b1d7..a474fb8e92e46 100644 --- a/src/javascript/app/pages/user/account/settings/account_closure.js +++ b/src/javascript/app/pages/user/account/settings/account_closure.js @@ -248,7 +248,6 @@ const AccountClosure = (() => { if (response.error.details.pending_withdrawals) { Object.keys(response.error.details.pending_withdrawals).forEach((account) => { const txt_pending_withdrawals = `${response.error.details.pending_withdrawals[account]} withdrawal(s)`; - console.log(txt_pending_withdrawals); section_id = 'account_closure_pending_withdrawals'; addSection(account, txt_pending_withdrawals); }); From 5dd4c1d35299371706895d97074820bcb79ea7a8 Mon Sep 17 00:00:00 2001 From: kevinw-binary Date: Tue, 22 Jun 2021 18:33:21 +0800 Subject: [PATCH 3/3] add localize on translateable sentence(s) --- .../app/pages/user/account/settings/account_closure.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/javascript/app/pages/user/account/settings/account_closure.js b/src/javascript/app/pages/user/account/settings/account_closure.js index a474fb8e92e46..b5877b0c177dd 100644 --- a/src/javascript/app/pages/user/account/settings/account_closure.js +++ b/src/javascript/app/pages/user/account/settings/account_closure.js @@ -221,7 +221,7 @@ const AccountClosure = (() => { }; if (response.error.details.open_positions) { Object.keys(response.error.details.open_positions).forEach((account) => { - const txt_positions = `${response.error.details.open_positions[account]} position(s)`; + const txt_positions = `${response.error.details.open_positions[account]} ${localize('position(s)')}`; if (/^MT/.test(account)) { section_id = 'account_closure_open_mt'; display_name = getMTDisplay(account); @@ -247,7 +247,7 @@ const AccountClosure = (() => { } if (response.error.details.pending_withdrawals) { Object.keys(response.error.details.pending_withdrawals).forEach((account) => { - const txt_pending_withdrawals = `${response.error.details.pending_withdrawals[account]} withdrawal(s)`; + const txt_pending_withdrawals = `${response.error.details.pending_withdrawals[account]} ${localize('withdrawal(s)')}`; section_id = 'account_closure_pending_withdrawals'; addSection(account, txt_pending_withdrawals); });