From f9c71cfece38bd73bae62050be03b02fa56eb0dc Mon Sep 17 00:00:00 2001 From: Hamid Date: Tue, 27 Sep 2022 11:28:07 +0330 Subject: [PATCH] hamid/65032/migrate-deposit-to-ts (#6307) * Migrate Deposit to TS * Remove package-lock.json * Fix test errors * Change data-testid name Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com> --- packages/cashier/package.json | 1 + .../{deposit.spec.js => deposit.spec.tsx} | 46 +++++++--- ...eposit.spec.js => crypto-deposit.spec.tsx} | 27 ++++-- ...{crypto-deposit.jsx => crypto-deposit.tsx} | 36 ++++---- .../src/pages/deposit/crypto-deposit/index.js | 3 - .../src/pages/deposit/crypto-deposit/index.ts | 3 + ...locked.spec.js => deposit-locked.spec.tsx} | 6 +- ...{deposit-locked.jsx => deposit-locked.tsx} | 50 ++++++----- .../src/pages/deposit/deposit-locked/index.js | 3 - .../src/pages/deposit/deposit-locked/index.ts | 3 + .../deposit/{deposit.jsx => deposit.tsx} | 89 ++++++++++--------- packages/cashier/src/pages/deposit/index.js | 3 - packages/cashier/src/pages/deposit/index.ts | 3 + .../src/types/stores/client-store.types.ts | 8 ++ 14 files changed, 165 insertions(+), 116 deletions(-) rename packages/cashier/src/pages/deposit/__tests__/{deposit.spec.js => deposit.spec.tsx} (76%) rename packages/cashier/src/pages/deposit/crypto-deposit/__tests__/{crypto-deposit.spec.js => crypto-deposit.spec.tsx} (92%) rename packages/cashier/src/pages/deposit/crypto-deposit/{crypto-deposit.jsx => crypto-deposit.tsx} (93%) delete mode 100644 packages/cashier/src/pages/deposit/crypto-deposit/index.js create mode 100644 packages/cashier/src/pages/deposit/crypto-deposit/index.ts rename packages/cashier/src/pages/deposit/deposit-locked/__tests__/{deposit-locked.spec.js => deposit-locked.spec.tsx} (95%) rename packages/cashier/src/pages/deposit/deposit-locked/{deposit-locked.jsx => deposit-locked.tsx} (78%) delete mode 100644 packages/cashier/src/pages/deposit/deposit-locked/index.js create mode 100644 packages/cashier/src/pages/deposit/deposit-locked/index.ts rename packages/cashier/src/pages/deposit/{deposit.jsx => deposit.tsx} (82%) delete mode 100644 packages/cashier/src/pages/deposit/index.js create mode 100644 packages/cashier/src/pages/deposit/index.ts diff --git a/packages/cashier/package.json b/packages/cashier/package.json index 2ce8dc40cba9..e518b31725cc 100644 --- a/packages/cashier/package.json +++ b/packages/cashier/package.json @@ -73,6 +73,7 @@ "@testing-library/react": "^12.0.0", "@types/react": "^18.0.7", "@types/react-dom": "^18.0.0", + "@types/qrcode.react": "^1.0.2", "babel-loader": "^8.1.0", "clean-webpack-plugin": "^3.0.0", "copy-webpack-plugin": "^9.0.1", diff --git a/packages/cashier/src/pages/deposit/__tests__/deposit.spec.js b/packages/cashier/src/pages/deposit/__tests__/deposit.spec.tsx similarity index 76% rename from packages/cashier/src/pages/deposit/__tests__/deposit.spec.js rename to packages/cashier/src/pages/deposit/__tests__/deposit.spec.tsx index 218a3d28fa07..e11e19aa9e20 100644 --- a/packages/cashier/src/pages/deposit/__tests__/deposit.spec.js +++ b/packages/cashier/src/pages/deposit/__tests__/deposit.spec.tsx @@ -11,16 +11,42 @@ jest.mock('@deriv/components', () => ({ ...jest.requireActual('@deriv/components'), Loading: () =>
Loading
, })); -jest.mock('Components/cashier-container/virtual', () => () =>
Virtual
); -jest.mock('Components/cashier-locked', () => () =>
CashierLocked
); -jest.mock('Components/funds-protection', () => () =>
FundsProtection
); -jest.mock('Components/crypto-transactions-history', () => () =>
CryptoTransactionsHistory
); -jest.mock('Components/error', () => () =>
Error
); -jest.mock('../crypto-deposit', () => () =>
CryptoDeposit
); -jest.mock('Components/cashier-container/real', () => () =>
Real
); -jest.mock('Components/cashier-onboarding/cashier-onboarding', () => () =>
CashierOnboarding
); -jest.mock('../crypto-deposit', () => () =>
CryptoDeposit
); -jest.mock('../deposit-locked', () => () =>
DepositLocked
); +jest.mock('Components/cashier-container/virtual', () => { + const CashierContainerVirtual = () =>
Virtual
; + return CashierContainerVirtual; +}); +jest.mock('Components/cashier-locked', () => { + const CashierLocked = () =>
CashierLocked
; + return CashierLocked; +}); +jest.mock('Components/funds-protection', () => { + const FundsProtection = () =>
FundsProtection
; + return FundsProtection; +}); +jest.mock('Components/crypto-transactions-history', () => { + const CryptoTransactionsHistory = () =>
CryptoTransactionsHistory
; + return CryptoTransactionsHistory; +}); +jest.mock('Components/error', () => { + const Error = () =>
Error
; + return Error; +}); +jest.mock('../crypto-deposit', () => { + const CryptoDeposit = () =>
CryptoDeposit
; + return CryptoDeposit; +}); +jest.mock('Components/cashier-container/real', () => { + const CashierContainerReal = () =>
Real
; + return CashierContainerReal; +}); +jest.mock('Components/cashier-onboarding/cashier-onboarding', () => { + const CashierOnboarding = () =>
CashierOnboarding
; + return CashierOnboarding; +}); +jest.mock('../deposit-locked', () => { + const DepositLocked = () =>
DepositLocked
; + return DepositLocked; +}); describe('', () => { const props = { diff --git a/packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.js b/packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.tsx similarity index 92% rename from packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.js rename to packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.tsx index fb6816f1fe79..dc642c1ef529 100644 --- a/packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.js +++ b/packages/cashier/src/pages/deposit/crypto-deposit/__tests__/crypto-deposit.spec.tsx @@ -22,9 +22,14 @@ jest.mock('@deriv/shared', () => ({ isMobile: jest.fn(() => false), })); -jest.mock('qrcode.react', () => () =>
QRCode
); - -jest.mock('Components/recent-transaction', () => () =>
RecentTransactions
); +jest.mock('qrcode.react', () => { + const QrCode = () =>
QRCode
; + return QrCode; +}); +jest.mock('Components/recent-transaction', () => { + const RecentTransactions = () =>
RecentTransactions
; + return RecentTransactions; +}); describe('', () => { let history; @@ -70,8 +75,8 @@ describe('', () => { expect(props.pollApiForDepositAddress).toHaveBeenCalledTimes(2); }); - it('should show proper messsages for BTC cryptocurrency', () => { - getCurrencyName.mockReturnValueOnce('Bitcoin'); + it('should show proper messages for BTC cryptocurrency', () => { + (getCurrencyName as jest.Mock).mockReturnValueOnce('Bitcoin'); renderWithRouter(); expect(screen.getByText('Send only Bitcoin (BTC) to this address.')).toBeInTheDocument(); @@ -87,8 +92,8 @@ describe('', () => { expect(screen.getByRole('link', { name: 'Try our Fiat onramp' })).toBeInTheDocument(); }); - it('should show proper messsages for ETH cryptocurrency', () => { - getCurrencyName.mockReturnValueOnce('Ethereum'); + it('should show proper messages for ETH cryptocurrency', () => { + (getCurrencyName as jest.Mock).mockReturnValueOnce('Ethereum'); renderWithRouter(); expect(screen.getByText('Send only Ethereum (ETH) to this address.')).toBeInTheDocument(); @@ -203,8 +208,12 @@ describe('', () => { }); it('should show "RecentTransactions" in Mobile mode', () => { - isMobile.mockReturnValue(true); - renderWithRouter(); + (isMobile as jest.Mock).mockReturnValue(true); + render( + + + + ); expect(screen.getByText('RecentTransactions')).toBeInTheDocument(); }); diff --git a/packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.jsx b/packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.tsx similarity index 93% rename from packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.jsx rename to packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.tsx index 136aaa4bf59a..c68409f93ddc 100644 --- a/packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.jsx +++ b/packages/cashier/src/pages/deposit/crypto-deposit/crypto-deposit.tsx @@ -1,13 +1,24 @@ -import PropTypes from 'prop-types'; import React, { useState } from 'react'; import { Button, ButtonLink, Clipboard, Dropdown, Icon, Loading, Text } from '@deriv/components'; import { localize, Localize } from '@deriv/translations'; import { CryptoConfig, getCurrencyName, isCryptocurrency, isMobile } from '@deriv/shared'; import QRCode from 'qrcode.react'; import { connect } from 'Stores/connect'; +import { TRootStore, TClientStore, TCryptoTransactionDetails } from 'Types'; import RecentTransaction from 'Components/recent-transaction'; import './crypto-deposit.scss'; +type TCryptoDeposit = { + api_error: string; + crypto_transactions: Array; + currency: TClientStore['currency']; + deposit_address: string; + is_deposit_address_loading: boolean; + recentTransactionOnMount: () => void; + pollApiForDepositAddress: (poll: boolean) => void; + setIsDeposit: (is_deposit: boolean) => void; +}; + const CryptoDeposit = ({ api_error, currency, @@ -17,7 +28,7 @@ const CryptoDeposit = ({ recentTransactionOnMount, pollApiForDepositAddress, setIsDeposit, -}) => { +}: TCryptoDeposit) => { React.useEffect(() => { recentTransactionOnMount(); }, [recentTransactionOnMount]); @@ -39,11 +50,11 @@ const CryptoDeposit = ({ { text: , value: 5 }, ]; - const [option_message, setOptionMessage] = useState(''); - const [option_list_value, setOptionListValue] = useState(0); - const [qrcode_header, setQRCodeHeader] = useState(''); + const [option_message, setOptionMessage] = useState(''); + const [option_list_value, setOptionListValue] = useState(0); + const [qrcode_header, setQRCodeHeader] = useState(''); - const onChangeListOption = event => { + const onChangeListOption = (event: { target: { value: number | string } }) => { const token_ETH = 'ETH'; const token_USDC_eUSDT = 'ERC20'; let token = ''; @@ -245,18 +256,7 @@ const CryptoDeposit = ({ ); }; -CryptoDeposit.propTypes = { - api_error: PropTypes.string, - crypto_transactions: PropTypes.array, - currency: PropTypes.string, - deposit_address: PropTypes.string, - is_deposit_address_loading: PropTypes.bool, - recentTransactionOnMount: PropTypes.func, - pollApiForDepositAddress: PropTypes.func, - setIsDeposit: PropTypes.func, -}; - -export default connect(({ modules, client }) => ({ +export default connect(({ modules, client }: TRootStore) => ({ api_error: modules.cashier.onramp.api_error, crypto_transactions: modules.cashier.transaction_history.crypto_transactions, currency: client.currency, diff --git a/packages/cashier/src/pages/deposit/crypto-deposit/index.js b/packages/cashier/src/pages/deposit/crypto-deposit/index.js deleted file mode 100644 index 76f15fb10171..000000000000 --- a/packages/cashier/src/pages/deposit/crypto-deposit/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import CryptoDeposit from './crypto-deposit.jsx'; - -export default CryptoDeposit; diff --git a/packages/cashier/src/pages/deposit/crypto-deposit/index.ts b/packages/cashier/src/pages/deposit/crypto-deposit/index.ts new file mode 100644 index 000000000000..7eb8d52423a3 --- /dev/null +++ b/packages/cashier/src/pages/deposit/crypto-deposit/index.ts @@ -0,0 +1,3 @@ +import CryptoDeposit from './crypto-deposit'; + +export default CryptoDeposit; diff --git a/packages/cashier/src/pages/deposit/deposit-locked/__tests__/deposit-locked.spec.js b/packages/cashier/src/pages/deposit/deposit-locked/__tests__/deposit-locked.spec.tsx similarity index 95% rename from packages/cashier/src/pages/deposit/deposit-locked/__tests__/deposit-locked.spec.js rename to packages/cashier/src/pages/deposit/deposit-locked/__tests__/deposit-locked.spec.tsx index dfb9f3d87d20..5950e449e525 100644 --- a/packages/cashier/src/pages/deposit/deposit-locked/__tests__/deposit-locked.spec.js +++ b/packages/cashier/src/pages/deposit/deposit-locked/__tests__/deposit-locked.spec.tsx @@ -132,11 +132,11 @@ describe('', () => { { content: 'Check proof of identity document verification status', status: 'action', - onClick: onClick, + onClick, }, ]; - const { container } = render(); - const btn = container.querySelector('.dc-checklist__item-status--action'); + render(); + const btn = screen.getByTestId('dt_checklist_item_status_action'); fireEvent.click(btn); expect(onClick).toHaveBeenCalled(); diff --git a/packages/cashier/src/pages/deposit/deposit-locked/deposit-locked.jsx b/packages/cashier/src/pages/deposit/deposit-locked/deposit-locked.tsx similarity index 78% rename from packages/cashier/src/pages/deposit/deposit-locked/deposit-locked.jsx rename to packages/cashier/src/pages/deposit/deposit-locked/deposit-locked.tsx index d6e01426e11c..9c288b8c1cb7 100644 --- a/packages/cashier/src/pages/deposit/deposit-locked/deposit-locked.jsx +++ b/packages/cashier/src/pages/deposit/deposit-locked/deposit-locked.tsx @@ -1,27 +1,39 @@ import React from 'react'; -import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; import { routes, WS } from '@deriv/shared'; import { Icon, Checklist, StaticUrl, Text } from '@deriv/components'; import { Localize, localize } from '@deriv/translations'; import { connect } from 'Stores/connect'; +import { TRootStore, TClientStore } from 'Types'; import CashierLocked from 'Components/cashier-locked'; +type TDepositLocked = { + account_status: TClientStore['account_status']; + is_financial_account: TClientStore['is_financial_account']; + is_financial_information_incomplete: TClientStore['is_financial_information_incomplete']; + is_tnc_needed: TClientStore['is_tnc_needed']; + is_trading_experience_incomplete: TClientStore['is_trading_experience_incomplete']; + onMount: () => void; + standpoint: TClientStore['standpoint']; +}; + const DepositLocked = ({ account_status, - is_tnc_needed, + is_financial_account, is_financial_information_incomplete, + is_tnc_needed, is_trading_experience_incomplete, - is_financial_account, onMount, standpoint, -}) => { +}: TDepositLocked) => { // handle authentication locked - const { identity, document, needs_verification } = account_status.authentication; - const is_poi_needed = needs_verification.includes('identity'); - const is_poa_needed = needs_verification.includes('document'); - const has_poi_submitted = identity.status !== 'none'; - const has_poa_submitted = document.status !== 'none'; + const identity = account_status?.authentication?.identity; + const document = account_status?.authentication?.document; + const needs_verification = account_status?.authentication?.needs_verification; + const is_poi_needed = needs_verification?.includes('identity'); + const is_poa_needed = needs_verification?.includes('document'); + const has_poi_submitted = identity?.status !== 'none'; + const has_poa_submitted = document?.status !== 'none'; const deposit_desc = standpoint.iom ? localize( 'We were unable to verify your information automatically. To enable this function, you must complete the following:' @@ -82,7 +94,7 @@ const DepositLocked = ({ : []), ]; return ( - + <> {items.length ? (
@@ -98,26 +110,16 @@ const DepositLocked = ({ ) : ( )} - + ); }; -DepositLocked.propTypes = { - account_status: PropTypes.object, - is_tnc_needed: PropTypes.bool, - is_financial_information_incomplete: PropTypes.bool, - is_trading_experience_incomplete: PropTypes.bool, - is_financial_account: PropTypes.bool, - onMount: PropTypes.func, - standpoint: PropTypes.object, -}; - -export default connect(({ client, modules }) => ({ +export default connect(({ client, modules }: TRootStore) => ({ account_status: client.account_status, - is_tnc_needed: client.is_tnc_needed, + is_financial_account: client.is_financial_account, is_financial_information_incomplete: client.is_financial_information_incomplete, + is_tnc_needed: client.is_tnc_needed, is_trading_experience_incomplete: client.is_trading_experience_incomplete, - is_financial_account: client.is_financial_account, onMount: modules.cashier.deposit.onMountDeposit, standpoint: client.standpoint, }))(DepositLocked); diff --git a/packages/cashier/src/pages/deposit/deposit-locked/index.js b/packages/cashier/src/pages/deposit/deposit-locked/index.js deleted file mode 100644 index b98848a379f2..000000000000 --- a/packages/cashier/src/pages/deposit/deposit-locked/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import DepositLocked from './deposit-locked.jsx'; - -export default DepositLocked; diff --git a/packages/cashier/src/pages/deposit/deposit-locked/index.ts b/packages/cashier/src/pages/deposit/deposit-locked/index.ts new file mode 100644 index 000000000000..9ec6d97c43e1 --- /dev/null +++ b/packages/cashier/src/pages/deposit/deposit-locked/index.ts @@ -0,0 +1,3 @@ +import DepositLocked from './deposit-locked'; + +export default DepositLocked; diff --git a/packages/cashier/src/pages/deposit/deposit.jsx b/packages/cashier/src/pages/deposit/deposit.tsx similarity index 82% rename from packages/cashier/src/pages/deposit/deposit.jsx rename to packages/cashier/src/pages/deposit/deposit.tsx index 17d856372f2f..aec5877593c3 100644 --- a/packages/cashier/src/pages/deposit/deposit.jsx +++ b/packages/cashier/src/pages/deposit/deposit.tsx @@ -1,7 +1,7 @@ -import PropTypes from 'prop-types'; import React from 'react'; import { Loading } from '@deriv/components'; import { connect } from 'Stores/connect'; +import { TRootStore, TClientStore } from 'Types'; import { Real, Virtual } from 'Components/cashier-container'; import { CashierOnboarding, CashierOnboardingSideNote } from 'Components/cashier-onboarding'; import CashierLocked from 'Components/cashier-locked'; @@ -14,6 +14,41 @@ import CryptoDeposit from './crypto-deposit'; import DepositLocked from './deposit-locked'; import SideNote from 'Components/side-note'; +type TDeposit = { + can_change_fiat_currency: TClientStore['can_change_fiat_currency']; + container: string; + crypto_transactions: Array; + currency: TClientStore['currency']; + current_currency_type: TClientStore['current_currency_type']; + clearIframe: () => void; + error: { + is_ask_uk_funds_protection?: boolean; + message?: string; + }; + iframe_height: number | string; + iframe_url: string; + is_cashier_locked: boolean; + is_cashier_onboarding: boolean; + is_crypto_transactions_visible: boolean; + is_crypto: boolean; + is_deposit_locked: boolean; + is_deposit: boolean; + is_eu: TClientStore['is_eu']; + is_loading: boolean; + is_switching: TClientStore['is_switching']; + is_system_maintenance: boolean; + is_virtual: TClientStore['is_virtual']; + landing_company_shortcode: TClientStore['landing_company_shortcode']; + onMount: () => void; + recentTransactionOnMount: () => void; + setActiveTab: (container: string) => void; + setErrorMessage: (error: string) => void; + setIsDeposit: (isDeposit: boolean) => void; + setSideNotes: (notes: object | null) => void; + standpoint: TClientStore['standpoint']; + tab_index: number; +}; + const Deposit = ({ can_change_fiat_currency, crypto_transactions, @@ -43,7 +78,7 @@ const Deposit = ({ setIsDeposit, setSideNotes, tab_index, -}) => { +}: TDeposit) => { const is_fiat_currency_banner_visible_for_MF_clients = landing_company_shortcode === 'maltainvest' && !is_crypto && !can_change_fiat_currency && !!iframe_height; React.useEffect(() => { @@ -137,58 +172,26 @@ const Deposit = ({ return ; }; -Deposit.propTypes = { - can_change_fiat_currency: PropTypes.bool, - clearIframe: PropTypes.func, - crypto_transactions: PropTypes.array, - container: PropTypes.string, - currency: PropTypes.string, - current_currency_type: PropTypes.string, - error: PropTypes.object, - is_cashier_onboarding: PropTypes.bool, - is_cashier_locked: PropTypes.bool, - is_deposit: PropTypes.bool, - is_crypto: PropTypes.bool, - is_crypto_transactions_visible: PropTypes.bool, - is_deposit_locked: PropTypes.bool, - is_eu: PropTypes.bool, - iframe_height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - iframe_url: PropTypes.string, - is_loading: PropTypes.bool, - is_switching: PropTypes.bool, - is_system_maintenance: PropTypes.bool, - is_virtual: PropTypes.bool, - landing_company_shortcode: PropTypes.string, - onMount: PropTypes.func, - recentTransactionOnMount: PropTypes.func, - setActiveTab: PropTypes.func, - setErrorMessage: PropTypes.func, - setIsDeposit: PropTypes.func, - setSideNotes: PropTypes.func, - standpoint: PropTypes.object, - tab_index: PropTypes.number, -}; - -export default connect(({ client, modules }) => ({ +export default connect(({ client, modules }: TRootStore) => ({ can_change_fiat_currency: client.can_change_fiat_currency, - crypto_transactions: modules.cashier.transaction_history.crypto_transactions, + clearIframe: modules.cashier.iframe.clearIframe, container: modules.cashier.deposit.container, + crypto_transactions: modules.cashier.transaction_history.crypto_transactions, currency: client.currency, current_currency_type: client.current_currency_type, error: modules.cashier.deposit.error, - is_cashier_onboarding: modules.cashier.general_store.is_cashier_onboarding, + iframe_height: modules.cashier.iframe.iframe_height, + iframe_url: modules.cashier.iframe.iframe_url, is_cashier_locked: modules.cashier.general_store.is_cashier_locked, - is_crypto: modules.cashier.general_store.is_crypto, + is_cashier_onboarding: modules.cashier.general_store.is_cashier_onboarding, is_crypto_transactions_visible: modules.cashier.transaction_history.is_crypto_transactions_visible, - is_deposit: modules.cashier.general_store.is_deposit, + is_crypto: modules.cashier.general_store.is_crypto, is_deposit_locked: modules.cashier.deposit.is_deposit_locked, + is_deposit: modules.cashier.general_store.is_deposit, is_eu: client.is_eu, - iframe_height: modules.cashier.iframe.iframe_height, - iframe_url: modules.cashier.iframe.iframe_url, - clearIframe: modules.cashier.iframe.clearIframe, is_loading: modules.cashier.general_store.is_loading, - is_system_maintenance: modules.cashier.general_store.is_system_maintenance, is_switching: client.is_switching, + is_system_maintenance: modules.cashier.general_store.is_system_maintenance, is_virtual: client.is_virtual, landing_company_shortcode: client.landing_company_shortcode, onMount: modules.cashier.deposit.onMountDeposit, diff --git a/packages/cashier/src/pages/deposit/index.js b/packages/cashier/src/pages/deposit/index.js deleted file mode 100644 index 0c6bc1363bbc..000000000000 --- a/packages/cashier/src/pages/deposit/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Deposit from './deposit.jsx'; - -export default Deposit; diff --git a/packages/cashier/src/pages/deposit/index.ts b/packages/cashier/src/pages/deposit/index.ts new file mode 100644 index 000000000000..e0fe48bfe75c --- /dev/null +++ b/packages/cashier/src/pages/deposit/index.ts @@ -0,0 +1,3 @@ +import Deposit from './deposit'; + +export default Deposit; diff --git a/packages/cashier/src/types/stores/client-store.types.ts b/packages/cashier/src/types/stores/client-store.types.ts index 3e24813784dd..bb5a2a57bcdc 100644 --- a/packages/cashier/src/types/stores/client-store.types.ts +++ b/packages/cashier/src/types/stores/client-store.types.ts @@ -14,11 +14,13 @@ export type TClientStore = { }; account_status: GetAccountStatus; balance?: string; + can_change_fiat_currency: boolean; currency: string; current_currency_type?: string; current_fiat_currency?: string; getLimits: () => void; is_account_setting_loaded: boolean; + is_eu: boolean; is_deposit_lock: boolean; is_dxtrade_allowed: boolean; is_financial_account: boolean; @@ -28,8 +30,11 @@ export type TClientStore = { is_logged_in: boolean; is_logging_in: boolean; is_switching: boolean; + is_tnc_needed: boolean; + is_trading_experience_incomplete: boolean; is_virtual: boolean; is_withdrawal_lock: boolean; + landing_company_shortcode: string; local_currency_config: { currency: string; decimal_places?: number; @@ -37,6 +42,9 @@ export type TClientStore = { loginid?: string; mt5_login_list: Array; residence: string; + standpoint: { + iom: string; + }; switchAccount: (value?: string) => void; verification_code: { payment_agent_withdraw: string;