-
-
-
+ {({ handleSubmit, values }) => {
+ const { fromAccount, fromAmount, isError, toAccount, toAmount } = values;
+ const isTransferBtnDisabled =
+ !fromAmount || !toAmount || isError || [fromAccount, toAccount].some(hasPlatformStatus);
+
+ return (
+
- )}
+
+ );
+ }}
{/* Portal for accounts list in mobile view */}
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferForm/__tests__/TransferForm.spec.tsx b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferForm/__tests__/TransferForm.spec.tsx
index d5c24177a099..53f5a333db9a 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferForm/__tests__/TransferForm.spec.tsx
+++ b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferForm/__tests__/TransferForm.spec.tsx
@@ -65,6 +65,7 @@ describe('
', () => {
it('should test that transfer button is disabled when fromAmount is 0', async () => {
(useTransfer as jest.Mock).mockReturnValue({
activeWallet: mockAccounts[0],
+ hasPlatformStatus: jest.fn(),
isLoading: false,
requestTransferBetweenAccounts: jest.fn(),
});
@@ -88,6 +89,7 @@ describe('
', () => {
it('should test that transfer button is disabled when toAmount is 0', async () => {
(useTransfer as jest.Mock).mockReturnValue({
activeWallet: mockAccounts[0],
+ hasPlatformStatus: jest.fn(),
isLoading: false,
requestTransferBetweenAccounts: jest.fn(),
});
@@ -122,6 +124,7 @@ describe('
', () => {
(useTransfer as jest.Mock).mockReturnValue({
activeWallet: mockAccounts[0],
+ hasPlatformStatus: jest.fn(),
isLoading: false,
requestTransferBetweenAccounts: dummyRequest,
});
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/TransferFormAccountCard.scss b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/TransferFormAccountCard.scss
index 574b853ea2cd..7858335555a0 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/TransferFormAccountCard.scss
+++ b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/TransferFormAccountCard.scss
@@ -7,6 +7,7 @@
&--badge {
border: 1px solid var(--status-warning, #ffad3a);
border-radius: 1rem;
+ margin-top: 0.4rem;
}
&--is-input {
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/TransferFormAccountCard.tsx b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/TransferFormAccountCard.tsx
index 6d481830174c..fc7f846a9d3e 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/TransferFormAccountCard.tsx
+++ b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/TransferFormAccountCard.tsx
@@ -5,24 +5,21 @@ import { Text, useDevice } from '@deriv-com/ui';
import { WalletCurrencyCard, WalletListCardBadge, WalletMarketCurrencyIcon } from '../../../../../../components';
import { TPlatforms } from '../../../../../../types';
import { PlatformStatusBadge } from '../../../../../cfd/components/PlatformStatusBadge';
-import { TRADING_PLATFORM_STATUS } from '../../../../../cfd/constants';
+import { DISABLED_PLATFORM_STATUSES } from '../../../../../cfd/constants';
import type { TAccount } from '../../types';
import './TransferFormAccountCard.scss';
type TProps = {
account?: TAccount;
+ hasPlatformStatus: (account: TAccount) => boolean;
type?: 'input' | 'modal';
};
-const TransferFormAccountCard: React.FC
= ({ account, type = 'modal' }) => {
+const TransferFormAccountCard: React.FC = ({ account, hasPlatformStatus, type = 'modal' }) => {
const { isDesktop } = useDevice();
const isInput = type === 'input';
const isModal = type === 'modal';
- const hasPlatformStatus =
- account?.status === TRADING_PLATFORM_STATUS.UNAVAILABLE ||
- account?.status === TRADING_PLATFORM_STATUS.MAINTENANCE;
-
return (
= ({ account, type = 'modal' })
{account?.accountName}
-
-
+
+
+ )}
+ {isModal && hasPlatformStatus(account) && (
+
-
+ )}
- {hasPlatformStatus && (
-
- )}
-
{isModal && !!account?.demo_account && (
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/__tests__/TransferFormAccountCard.spec.tsx b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/__tests__/TransferFormAccountCard.spec.tsx
index 835bd8056473..7686e3c1ce93 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/__tests__/TransferFormAccountCard.spec.tsx
+++ b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountCard/__tests__/TransferFormAccountCard.spec.tsx
@@ -39,7 +39,9 @@ describe('TransferFormAccountCard', () => {
);
it('should render without crashing', () => {
- render(, { wrapper });
+ render(, {
+ wrapper,
+ });
expect(screen.queryByText('Test Account')).not.toBeInTheDocument();
expect(screen.queryByText('Balance: 1000 USD')).not.toBeInTheDocument();
@@ -52,6 +54,7 @@ describe('TransferFormAccountCard', () => {
,
{ wrapper }
@@ -70,6 +73,7 @@ describe('TransferFormAccountCard', () => {
,
{ wrapper }
@@ -90,6 +94,7 @@ describe('TransferFormAccountCard', () => {
,
{ wrapper }
@@ -108,6 +113,7 @@ describe('TransferFormAccountCard', () => {
,
{ wrapper }
@@ -126,6 +132,7 @@ describe('TransferFormAccountCard', () => {
,
{ wrapper }
@@ -142,6 +149,7 @@ describe('TransferFormAccountCard', () => {
,
{ wrapper }
@@ -153,6 +161,7 @@ describe('TransferFormAccountCard', () => {
);
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountSelection/TransferFormAccountSelection.tsx b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountSelection/TransferFormAccountSelection.tsx
index 74d9ff7596ca..06dc494587eb 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountSelection/TransferFormAccountSelection.tsx
+++ b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountSelection/TransferFormAccountSelection.tsx
@@ -12,6 +12,7 @@ type TProps = {
accountsList: TAccountsList;
activeWallet: TAccount;
fromAccount?: TAccount;
+ hasPlatformStatus: (account: TAccount) => boolean;
isFromAccountDropdown: boolean;
label: string;
onSelect: (value?: TAccount) => void;
@@ -30,6 +31,7 @@ const TransferFormAccountSelection: React.FC = ({
accountsList,
activeWallet,
fromAccount,
+ hasPlatformStatus,
isFromAccountDropdown,
label,
onSelect,
@@ -129,7 +131,10 @@ const TransferFormAccountSelection: React.FC = ({
modal.hide();
}}
>
-
+
))}
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountSelection/__tests__/TransferFormAccountSelection.spec.tsx b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountSelection/__tests__/TransferFormAccountSelection.spec.tsx
index 86a63ebf0f0e..e5d0416fdb04 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountSelection/__tests__/TransferFormAccountSelection.spec.tsx
+++ b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAccountSelection/__tests__/TransferFormAccountSelection.spec.tsx
@@ -34,6 +34,7 @@ describe('TransferFormAccountSelection', () => {
wallets: [{ accountName: 'Wallet 1', currencyConfig: { display_code: 'GBP' }, loginid: 'CRW123' }],
},
activeWallet: { accountName: 'Active Wallet', currencyConfig: { display_code: 'USD' }, loginid: 'CR123' },
+ hasPlatformStatus: jest.fn(),
label: 'Transfer from',
onSelect: mockOnSelect,
selectedAccount: { loginid: 'CR123' },
@@ -55,6 +56,7 @@ describe('TransferFormAccountSelection', () => {
},
activeWallet: undefined,
fromAccount: undefined,
+ hasPlatformStatus: jest.fn(),
label: 'Transfer to',
onSelect: mockOnSelect,
selectedAccount: undefined,
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAmountInput/TransferFormAmountInput.tsx b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAmountInput/TransferFormAmountInput.tsx
index bb97cc33ed3f..123a54f3c72a 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAmountInput/TransferFormAmountInput.tsx
+++ b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormAmountInput/TransferFormAmountInput.tsx
@@ -22,8 +22,14 @@ const TransferFormAmountInput: React.FC = ({ fieldName }) => {
const { fromAccount, fromAmount, toAccount, toAmount } = values;
const { localize } = useTranslations();
- const { USDExchangeRates, activeWallet, activeWalletExchangeRates, refetchAccountLimits, refetchExchangeRates } =
- useTransfer();
+ const {
+ USDExchangeRates,
+ activeWallet,
+ activeWalletExchangeRates,
+ hasPlatformStatus,
+ refetchAccountLimits,
+ refetchExchangeRates,
+ } = useTransfer();
const refetchExchangeRatesAndLimits = useCallback(() => {
refetchAccountLimits();
@@ -35,7 +41,8 @@ const TransferFormAmountInput: React.FC = ({ fieldName }) => {
const hasFunds = Number(fromAccount?.balance) > 0;
const isFromAmountField = fieldName === 'fromAmount';
const isSameCurrency = fromAccount?.currency === toAccount?.currency;
- const isAmountInputDisabled = !hasFunds || (fieldName === 'toAmount' && !toAccount);
+ const isAmountInputDisabled =
+ !hasFunds || (fieldName === 'toAmount' && !toAccount) || [fromAccount, toAccount].some(hasPlatformStatus);
const isAmountFieldActive = fieldName === values.activeAmountFieldName;
const isTimerVisible = !isFromAmountField && toAccount && !isSameCurrency && fromAmount > 0 && toAmount > 0;
const prevTimerVisible = useRef(isTimerVisible);
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormDropdown/TransferFormDropdown.tsx b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormDropdown/TransferFormDropdown.tsx
index 050a5706aea0..ec321e27b4c9 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormDropdown/TransferFormDropdown.tsx
+++ b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormDropdown/TransferFormDropdown.tsx
@@ -1,13 +1,11 @@
import React, { RefObject, useCallback, useEffect, useMemo } from 'react';
import { useFormikContext } from 'formik';
import { useHistory } from 'react-router-dom';
-import { useTradingPlatformStatus } from '@deriv/api-v2';
import { LegacyChevronDown2pxIcon } from '@deriv/quill-icons';
import { Localize, useTranslations } from '@deriv-com/translations';
import { Text, useDevice } from '@deriv-com/ui';
import { WalletListCardBadge } from '../../../../../../components';
import { useModal } from '../../../../../../components/ModalProvider';
-import { TRADING_PLATFORM_STATUS } from '../../../../../cfd/constants';
import { useTransfer } from '../../provider';
import { TInitialTransferFormValues, TToAccount } from '../../types';
import { TransferFormAccountCard } from '../TransferFormAccountCard';
@@ -21,12 +19,11 @@ type TProps = {
const TransferFormDropdown: React.FC = ({ fieldName, mobileAccountsListRef }) => {
const { setValues, values } = useFormikContext();
- const { accounts, activeWallet } = useTransfer();
+ const { accounts, activeWallet, hasPlatformStatus } = useTransfer();
const { localize } = useTranslations();
const { fromAccount, toAccount } = values;
const { isDesktop } = useDevice();
const modal = useModal();
- const { getPlatformStatus } = useTradingPlatformStatus();
const isFromAccountDropdown = fieldName === 'fromAccount';
@@ -58,12 +55,6 @@ const TransferFormDropdown: React.FC = ({ fieldName, mobileAccountsListR
const shouldDefaultUSDWallet =
location.pathname === '/wallet/account-transfer' ? location.state?.shouldSelectDefaultWallet : false;
- const platformStatus = getPlatformStatus(selectedAccount?.account_type ?? '');
-
- const hasPlatformStatus =
- selectedAccount?.status === TRADING_PLATFORM_STATUS.UNAVAILABLE ||
- platformStatus === TRADING_PLATFORM_STATUS.MAINTENANCE;
-
const toDefaultAccount = useMemo(
() => toAccountList.walletAccounts.find(wallet => wallet.currency === 'USD'),
[toAccountList.walletAccounts]
@@ -128,6 +119,7 @@ const TransferFormDropdown: React.FC = ({ fieldName, mobileAccountsListR
accountsList={accountsList}
activeWallet={activeWallet}
fromAccount={fromAccount}
+ hasPlatformStatus={hasPlatformStatus}
isFromAccountDropdown={isFromAccountDropdown}
label={label}
onSelect={handleSelect}
@@ -149,7 +141,11 @@ const TransferFormDropdown: React.FC = ({ fieldName, mobileAccountsListR
{selectedAccount ? (
-
+
) : (
@@ -170,12 +166,7 @@ const TransferFormDropdown: React.FC = ({ fieldName, mobileAccountsListR
) : null}
- {!hasPlatformStatus && (
-
- )}
+
>
)}
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormDropdown/__tests__/TransferFormDropdown.spec.tsx b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormDropdown/__tests__/TransferFormDropdown.spec.tsx
index 9bae7c06058e..1dad684cabcd 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormDropdown/__tests__/TransferFormDropdown.spec.tsx
+++ b/packages/wallets/src/features/cashier/modules/Transfer/components/TransferFormDropdown/__tests__/TransferFormDropdown.spec.tsx
@@ -86,6 +86,7 @@ describe('TransferFormDropdown', () => {
demo_account: 0,
loginid: 'CR1234',
},
+ hasPlatformStatus: jest.fn(),
});
});
@@ -110,6 +111,7 @@ describe('TransferFormDropdown', () => {
});
(useTransfer as jest.Mock).mockReturnValue({
accounts: {},
+ hasPlatformStatus: jest.fn(),
});
(useDevice as jest.Mock).mockReturnValue({
isMobile: true,
@@ -144,6 +146,7 @@ describe('TransferFormDropdown', () => {
displayBalance: '1000 USD',
loginid: 'CR1234',
},
+ hasPlatformStatus: jest.fn(),
});
render(
, { wrapper });
@@ -213,6 +216,7 @@ describe('TransferFormDropdown', () => {
currency: 'USD',
loginid: 'CR1234',
},
+ hasPlatformStatus: jest.fn(),
});
render(
, { wrapper });
@@ -246,6 +250,7 @@ describe('TransferFormDropdown', () => {
currency: 'USD',
loginid: 'CR1234',
},
+ hasPlatformStatus: jest.fn(),
});
render(
, { wrapper });
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/hooks/useExtendedTransferAccountProperties.ts b/packages/wallets/src/features/cashier/modules/Transfer/hooks/useExtendedTransferAccountProperties.ts
index c4cf666f8c2b..51849b73e52e 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/hooks/useExtendedTransferAccountProperties.ts
+++ b/packages/wallets/src/features/cashier/modules/Transfer/hooks/useExtendedTransferAccountProperties.ts
@@ -1,14 +1,18 @@
import { useMemo } from 'react';
-import { useActiveWalletAccount, useCurrencyConfig } from '@deriv/api-v2';
+import { useActiveWalletAccount, useCurrencyConfig, useTradingPlatformStatus } from '@deriv/api-v2';
import { displayMoney } from '@deriv/api-v2/src/utils';
import { THooks, TWalletLandingCompanyName } from '../../../../../types';
+import { CFD_PLATFORMS } from '../../../../cfd/constants';
import { PlatformDetails } from '../../../constants';
-import { getAccountName, getLandingCompanyNameOfMT5Account, getMarketType } from '../../../helpers';
+import { getAccountName, getLandingCompanyNameOfMT5Account } from '../../../helpers';
+
+type TCFDPlatform = Exclude
;
/** A custom hook that enhances the transfer accounts response by adding additional properties for convenient UI rendering. */
const useExtendedTransferAccountProperties = (accounts?: THooks.TransferAccount[]) => {
const { data: activeWallet, isLoading: isActiveWalletLoading } = useActiveWalletAccount();
const { getConfig, isLoading: isCurrencyConfigLoading } = useCurrencyConfig();
+ const { getPlatformStatus } = useTradingPlatformStatus();
const isLoading = isCurrencyConfigLoading || isActiveWalletLoading;
@@ -21,7 +25,7 @@ const useExtendedTransferAccountProperties = (accounts?: THooks.TransferAccount[
accountType: account.account_type,
displayCurrencyCode: currencyConfig?.display_code,
landingCompanyName: activeWallet?.landing_company_name as TWalletLandingCompanyName,
- mt5MarketType: getMarketType(account.mt5_group),
+ mt5MarketType: account.market_type,
product: account.product,
});
const displayBalance = displayMoney(Number(account.balance), currencyConfig?.display_code, {
@@ -31,6 +35,11 @@ const useExtendedTransferAccountProperties = (accounts?: THooks.TransferAccount[
account.account_type === PlatformDetails.mt5.name
? getLandingCompanyNameOfMT5Account(account.mt5_group)
: (activeWallet?.landing_company_name as TWalletLandingCompanyName);
+ const isCFDAccount =
+ account?.account_category === 'trading' &&
+ [CFD_PLATFORMS.CTRADER, CFD_PLATFORMS.DXTRADE, CFD_PLATFORMS.MT5].includes(
+ account?.account_type as TCFDPlatform
+ );
return {
...account,
@@ -38,6 +47,9 @@ const useExtendedTransferAccountProperties = (accounts?: THooks.TransferAccount[
currencyConfig,
displayBalance,
landingCompanyName,
+ ...(isCFDAccount && {
+ platformStatus: getPlatformStatus(account.account_type ?? ''),
+ }),
} as const;
});
@@ -45,7 +57,7 @@ const useExtendedTransferAccountProperties = (accounts?: THooks.TransferAccount[
const walletAccounts = updatedAccounts?.filter(account => account.account_category === 'wallet') || [];
return { tradingAccounts, walletAccounts };
- }, [accounts, activeWallet?.landing_company_name, getConfig]);
+ }, [accounts, activeWallet?.landing_company_name, getConfig, getPlatformStatus]);
const modifiedActiveWallet = useMemo(() => {
return extendedTransferAccounts.walletAccounts.find(account => account.loginid === activeWallet?.loginid);
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/hooks/useSortedTransferAccounts.ts b/packages/wallets/src/features/cashier/modules/Transfer/hooks/useSortedTransferAccounts.ts
index 0c465f20e762..f54f995c1580 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/hooks/useSortedTransferAccounts.ts
+++ b/packages/wallets/src/features/cashier/modules/Transfer/hooks/useSortedTransferAccounts.ts
@@ -1,6 +1,5 @@
import { useMemo } from 'react';
import { MT5MarketTypeDetails, PlatformDetails } from '../../../constants';
-import { getMarketType } from '../../../helpers';
import { TAccount, TAccountsList } from '../types';
const useSortedTransferAccounts = (accounts: TAccountsList) => {
@@ -69,8 +68,8 @@ const sortTradingAccounts = (a: TAccount, b: TAccount) => {
// For mt5 accounts, compare market types
if (typeA === PlatformDetails.mt5.name) {
- const marketTypeA = getMarketType(a.mt5_group);
- const marketTypeB = getMarketType(b.mt5_group);
+ const marketTypeA = a.market_type;
+ const marketTypeB = b.market_type;
if (
marketTypeOrder[marketTypeA ?? MT5MarketTypeDetails.all.name] !==
diff --git a/packages/wallets/src/features/cashier/modules/Transfer/provider/TransferProvider.tsx b/packages/wallets/src/features/cashier/modules/Transfer/provider/TransferProvider.tsx
index ac3f7c56413d..c55394ff2b09 100644
--- a/packages/wallets/src/features/cashier/modules/Transfer/provider/TransferProvider.tsx
+++ b/packages/wallets/src/features/cashier/modules/Transfer/provider/TransferProvider.tsx
@@ -1,6 +1,7 @@
import React, { createContext, useCallback, useContext, useEffect, useState } from 'react';
import { useAccountLimits, useGetExchangeRate, useTransferBetweenAccounts } from '@deriv/api-v2';
import type { THooks } from '../../../../../types';
+import { DISABLED_PLATFORM_STATUSES } from '../../../../cfd/constants';
import { useExtendedTransferAccountProperties, useSortedTransferAccounts } from '../hooks';
import type { TInitialTransferFormValues } from '../types';
@@ -19,6 +20,7 @@ export type TTransferContext = {
activeWallet: ReturnType['activeWallet'];
activeWalletExchangeRates?: THooks.ExchangeRate;
error: ReturnType['error'];
+ hasPlatformStatus: (account: TInitialTransferFormValues['fromAccount']) => boolean;
isLoading: boolean;
receipt?: TReceipt;
refetchAccountLimits: ReturnType['refetch'];
@@ -51,6 +53,11 @@ const TransferProvider: React.FC> = ({ accounts:
const [receipt, setReceipt] = useState();
const sortedAccounts = useSortedTransferAccounts(accounts);
+ const hasPlatformStatus = (account: TInitialTransferFormValues['fromAccount']) =>
+ DISABLED_PLATFORM_STATUSES.includes(
+ (account?.status || account?.platformStatus) as typeof DISABLED_PLATFORM_STATUSES[number]
+ );
+
const { data: accountLimits, refetch: refetchAccountLimits } = useAccountLimits();
const { data: activeWalletExchangeRates, refetch: refetchActiveWalletExchangeRates } = useGetExchangeRate({
@@ -124,6 +131,7 @@ const TransferProvider: React.FC> = ({ accounts:
activeWallet,
activeWalletExchangeRates,
error,
+ hasPlatformStatus,
isLoading,
receipt,
refetchAccountLimits,
diff --git a/packages/wallets/src/features/cashier/modules/WithdrawalCrypto/components/WithdrawalCryptoForm/components/WithdrawalCryptoPriority/WithdrawalCryptoPriority.tsx b/packages/wallets/src/features/cashier/modules/WithdrawalCrypto/components/WithdrawalCryptoForm/components/WithdrawalCryptoPriority/WithdrawalCryptoPriority.tsx
index 99f628d7b8ce..335afbde3291 100644
--- a/packages/wallets/src/features/cashier/modules/WithdrawalCrypto/components/WithdrawalCryptoForm/components/WithdrawalCryptoPriority/WithdrawalCryptoPriority.tsx
+++ b/packages/wallets/src/features/cashier/modules/WithdrawalCrypto/components/WithdrawalCryptoForm/components/WithdrawalCryptoPriority/WithdrawalCryptoPriority.tsx
@@ -1,9 +1,9 @@
import React, { useEffect } from 'react';
import { useFormikContext } from 'formik';
+import { LegacyInfo1pxIcon } from '@deriv/quill-icons';
import { useTranslations } from '@deriv-com/translations';
import { Checkbox, Tooltip } from '@deriv-com/ui';
import { WalletsPriorityCryptoWithdrawLoader } from '../../../../../../../../components';
-import InfoIcon from '../../../../../../../../public/images/ic-info-outline.svg';
import { useWithdrawalCryptoContext } from '../../../../provider';
import { WithdrawalCryptoPriorityFeeInfo } from '../WithdrawalCryptoPriorityFeeInfo';
import './WithdrawalCryptoPriority.scss';
@@ -66,7 +66,7 @@ const WithdrawalCryptoPriority = () => {
)}
tooltipPosition='top'
>
-
+
{isLoadingCryptoEstimationFee &&