;
+ const can_show_notify = !is_switching && !is_logging_in && is_account_setting_loaded && is_landing_company_loaded;
+
const [scrolled, setScrolled] = React.useState(false);
const handleScroll = () => {
@@ -80,7 +82,7 @@ const TradersHub = () => {
height_offset='50px'
is_disabled={isDesktop()}
>
-
+ {can_show_notify && }
diff --git a/packages/bot-skeleton/package.json b/packages/bot-skeleton/package.json
index b19bf02aea06..f396b5a390ac 100644
--- a/packages/bot-skeleton/package.json
+++ b/packages/bot-skeleton/package.json
@@ -35,7 +35,7 @@
"eslint-plugin-react-hooks": "^4.2.0"
},
"dependencies": {
- "@deriv/deriv-api": "^1.0.8",
+ "@deriv/deriv-api": "^1.0.11",
"@deriv/indicators": "^1.0.0",
"@deriv/js-interpreter": "^3.0.0",
"@deriv/shared": "^1.0.0",
diff --git a/packages/cashier/package.json b/packages/cashier/package.json
index dfbfccdcc720..cb6ea9fe2060 100644
--- a/packages/cashier/package.json
+++ b/packages/cashier/package.json
@@ -36,9 +36,9 @@
},
"dependencies": {
"@deriv/api": "^1.0.0",
- "@deriv/api-types": "^1.0.54",
+ "@deriv/api-types": "^1.0.11",
"@deriv/components": "^1.0.0",
- "@deriv/deriv-api": "^1.0.8",
+ "@deriv/deriv-api": "^1.0.11",
"@deriv/hooks": "^1.0.0",
"@deriv/p2p": "^0.7.3",
"@deriv/shared": "^1.0.0",
@@ -56,7 +56,7 @@
"react-content-loader": "^6.2.0",
"react-dom": "^17.0.2",
"react-loadable": "^5.5.0",
- "framer-motion":"^6.5.1",
+ "framer-motion": "^6.5.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0"
},
diff --git a/packages/cashier/src/pages/account-transfer/account-transfer-receipt/account-transfer-receipt.tsx b/packages/cashier/src/pages/account-transfer/account-transfer-receipt/account-transfer-receipt.tsx
index 7b3b45a03ff8..ba90ee03720b 100644
--- a/packages/cashier/src/pages/account-transfer/account-transfer-receipt/account-transfer-receipt.tsx
+++ b/packages/cashier/src/pages/account-transfer/account-transfer-receipt/account-transfer-receipt.tsx
@@ -3,7 +3,7 @@ import classNames from 'classnames';
import AccountPlatformIcon from '../../../components/account-platform-icon';
import { withRouter, RouteComponentProps } from 'react-router';
import { Button, Modal, Icon, Text } from '@deriv/components';
-import { formatMoney, getCurrencyDisplayCode, isMobile, routes } from '@deriv/shared';
+import { getCurrencyDisplayCode, isMobile, routes } from '@deriv/shared';
import { localize, Localize } from '@deriv/translations';
import { useStore, observer } from '@deriv/stores';
import { useCashierStore } from '../../../stores/useCashierStores';
@@ -86,7 +86,7 @@ const AccountTransferReceipt = observer(({ onClose, history }: TAccountTransferR
diff --git a/packages/cashier/src/pages/p2p-cashier/p2p-cashier.tsx b/packages/cashier/src/pages/p2p-cashier/p2p-cashier.tsx
index b23aa9d987f2..6cbfde472a07 100644
--- a/packages/cashier/src/pages/p2p-cashier/p2p-cashier.tsx
+++ b/packages/cashier/src/pages/p2p-cashier/p2p-cashier.tsx
@@ -36,7 +36,7 @@ const P2PCashier = observer(({ history, location }: TP2PCashierProps) => {
const [order_id, setOrderId] = React.useState(null);
const [action_param, setActionParam] = React.useState(null);
const [code_param, setCodeParam] = React.useState(null);
-
+ const url_params = new URLSearchParams(location.search);
const server_time = {
get,
init,
@@ -45,20 +45,18 @@ const P2PCashier = observer(({ history, location }: TP2PCashierProps) => {
const setQueryOrder = React.useCallback(
(input_order_id: string | null) => {
- const current_query_params = new URLSearchParams(location.search);
-
if (is_mobile) {
- current_query_params.delete('action');
- current_query_params.delete('code');
+ url_params.delete('action');
+ url_params.delete('code');
}
- if (current_query_params.has('order_id') || current_query_params.has('order')) {
- current_query_params.delete('order');
- current_query_params.delete('order_id');
+ if (url_params.has('order_id') || url_params.has('order')) {
+ url_params.delete('order');
+ url_params.delete('order_id');
}
if (input_order_id) {
- current_query_params.append('order', input_order_id);
+ url_params.append('order', input_order_id);
}
if (!input_order_id) {
@@ -72,10 +70,11 @@ const P2PCashier = observer(({ history, location }: TP2PCashierProps) => {
// Changing query params
history.push({
pathname: routes.cashier_p2p,
- search: current_query_params.toString(),
+ search: url_params.toString(),
hash: location.hash,
});
-
+ url_params.delete('action');
+ url_params.delete('code');
setOrderId(input_order_id);
}
},
@@ -85,7 +84,6 @@ const P2PCashier = observer(({ history, location }: TP2PCashierProps) => {
);
React.useEffect(() => {
- const url_params = new URLSearchParams(location.search);
let passed_order_id;
setActionParam(url_params.get('action'));
@@ -114,7 +112,7 @@ const P2PCashier = observer(({ history, location }: TP2PCashierProps) => {
return () => setQueryOrder(null);
// eslint-disable-next-line react-hooks/exhaustive-deps
- }, [setQueryOrder]);
+ }, []);
if (is_logging_in) {
return ;
diff --git a/packages/cashier/src/pages/payment-agent/payment-agent-list/payment-agent-list.scss b/packages/cashier/src/pages/payment-agent/payment-agent-list/payment-agent-list.scss
index e1c7ee2fe167..39618819c1bc 100644
--- a/packages/cashier/src/pages/payment-agent/payment-agent-list/payment-agent-list.scss
+++ b/packages/cashier/src/pages/payment-agent/payment-agent-list/payment-agent-list.scss
@@ -18,7 +18,7 @@
background-color: var(--general-main-1);
width: 100%;
left: 0;
- z-index: 1000;
+ z-index: 2;
padding: 1.6rem 5rem;
}
}
diff --git a/packages/cashier/src/stores/account-transfer-store.ts b/packages/cashier/src/stores/account-transfer-store.ts
index 5c1339cd4fb9..741c3cd3be56 100644
--- a/packages/cashier/src/stores/account-transfer-store.ts
+++ b/packages/cashier/src/stores/account-transfer-store.ts
@@ -14,7 +14,7 @@ import {
routes,
} from '@deriv/shared';
import type { TransferBetweenAccountsResponse } from '@deriv/api-types';
-import { localize, Localize } from '@deriv/translations';
+import { localize } from '@deriv/translations';
import AccountTransferGetSelectedError from 'Pages/account-transfer/account-transfer-get-selected-error';
import Constants from 'Constants/constants';
import ErrorStore from './error-store';
@@ -81,7 +81,7 @@ export default class AccountTransferStore {
is_mt5_transfer_in_progress = false;
minimum_fee: string | null = null;
receipt = {
- amount_transferred: 0,
+ amount_transferred: '',
};
selected_from: TAccount = {};
selected_to: TAccount = {};
@@ -520,7 +520,7 @@ export default class AccountTransferStore {
this.is_mt5_transfer_in_progress = is_mt5_transfer_in_progress;
}
- setReceiptTransfer({ amount }: { amount: number }): void {
+ setReceiptTransfer({ amount }: { amount: string }): void {
this.receipt = {
amount_transferred: amount,
};
@@ -624,7 +624,7 @@ export default class AccountTransferStore {
}
this.error.setErrorMessage(transfer_between_accounts.error);
} else {
- this.setReceiptTransfer({ amount: Number(formatMoney(currency || '', amount, true)) });
+ this.setReceiptTransfer({ amount: formatMoney(currency || '', amount, true) });
transfer_between_accounts.accounts?.forEach(account => {
this.setBalanceByLoginId(account.loginid || '', account.balance || '');
if (account.loginid === this.selected_from.value) {
@@ -719,8 +719,6 @@ export default class AccountTransferStore {
const { is_ok, message } = validNumber(converter_to_amount, {
type: 'float',
decimals: getDecimalPlaces(currency || ''),
- min: 0,
- max: 0,
});
if (!is_ok) {
setConverterToError(message);
diff --git a/packages/cfd/package.json b/packages/cfd/package.json
index 6c5ba4e3c9ba..6c4015a9f8a9 100644
--- a/packages/cfd/package.json
+++ b/packages/cfd/package.json
@@ -79,9 +79,9 @@
},
"dependencies": {
"@deriv/account": "^1.0.0",
- "@deriv/api-types": "^1.0.54",
+ "@deriv/api-types": "^1.0.11",
"@deriv/components": "^1.0.0",
- "@deriv/deriv-api": "^1.0.8",
+ "@deriv/deriv-api": "^1.0.11",
"@deriv/shared": "^1.0.0",
"@deriv/stores": "^1.0.0",
"@deriv/translations": "^1.0.0",
diff --git a/packages/cfd/src/Containers/dmt5-trade-modal.tsx b/packages/cfd/src/Containers/dmt5-trade-modal.tsx
index b722efa453f9..28fcca9e4f17 100644
--- a/packages/cfd/src/Containers/dmt5-trade-modal.tsx
+++ b/packages/cfd/src/Containers/dmt5-trade-modal.tsx
@@ -2,8 +2,15 @@ import React from 'react';
import { Text, Button, Icon, Money, Popover } from '@deriv/components';
import { TPasswordBoxProps, TTradingPlatformAccounts, TCFDDashboardContainer } from '../Components/props.types';
import { DetailsOfEachMT5Loginid } from '@deriv/api-types';
-import { CFD_PLATFORMS, getCFDAccountDisplay, getCFDPlatformLabel, getUrlBase, getCFDAccountKey } from '@deriv/shared';
-import { localize } from '@deriv/translations';
+import {
+ CFD_PLATFORMS,
+ isMobile,
+ getCFDAccountDisplay,
+ getCFDPlatformLabel,
+ getUrlBase,
+ getCFDAccountKey,
+} from '@deriv/shared';
+import { Localize, localize } from '@deriv/translations';
import { CFDAccountCopy } from '../Components/cfd-account-copy';
import { getPlatformMt5DownloadLink, getMT5WebTerminalLink } from '../Helpers/constants';
import TradingPlatformIcon from '../Assets/svgs/trading-platform';
@@ -175,6 +182,16 @@ const DMT5TradeModal = ({
/>