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

Commit df41377

Browse files
hotfix: wrong error message on MT5 account creation (#6752)
1 parent 0fa5a2b commit df41377

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/javascript/app/pages/user/metatrader/metatrader.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,16 @@ const MetaTrader = (() => {
297297
MetaTraderUI.enableButton(action);
298298
return;
299299
}
300-
await BinarySocket.send({
300+
const response = await BinarySocket.send({
301301
trading_platform_password_change: 1,
302302
new_password : req.mainPassword,
303303
platform : 'mt5',
304304
});
305+
if (response.error) {
306+
MetaTraderUI.displayFormMessage(response.error.message, action);
307+
MetaTraderUI.enableButton(action, response);
308+
return;
309+
}
305310
}
306311
BinarySocket.send(req).then(async (response) => {
307312
if (response.error) {

0 commit comments

Comments
 (0)