diff --git a/packages/account/package.json b/packages/account/package.json index cfd2445d9f8d..e5fc0ce69e40 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@binary-com/binary-document-uploader": "^2.4.7", - "@deriv/api-types": "^1.0.94", + "@deriv/api-types": "^1.0.112", "@deriv/components": "^1.0.0", "@deriv/shared": "^1.0.0", "@deriv/translations": "^1.0.0", diff --git a/packages/api/package.json b/packages/api/package.json index 603e827785a0..79aec9b40f09 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -10,7 +10,7 @@ "@tanstack/react-query-devtools": "^4.28.0" }, "devDependencies": { - "@deriv/api-types": "^1.0.94", + "@deriv/api-types": "^1.0.112", "@testing-library/react": "^12.0.0", "@testing-library/react-hooks": "^7.0.2", "@testing-library/user-event": "^13.5.0", diff --git a/packages/appstore/package.json b/packages/appstore/package.json index a3f554b6cd08..bbba390ce95a 100644 --- a/packages/appstore/package.json +++ b/packages/appstore/package.json @@ -26,19 +26,17 @@ "dependencies": { "@deriv/account": "^1.0.0", "@deriv/api": "^1.0.0", - "@deriv/api-types": "^1.0.94", + "@deriv/api-types": "^1.0.112", "@deriv/cashier": "^1.0.0", - "@deriv/components": "^1.0.0", "@deriv/cfd": "^1.0.0", + "@deriv/components": "^1.0.0", + "@deriv/hooks": "^1.0.0", "@deriv/shared": "^1.0.0", "@deriv/stores": "^1.0.0", - "@testing-library/jest-dom": "^5.12.0", - "@deriv/hooks": "^1.0.0", "@deriv/trader": "^3.8.0", "@deriv/translations": "^1.0.0", - "@deriv/hooks": "^1.0.0", - "@deriv/ui": "^0.8.0", "@deriv/utils": "^1.0.0", + "@testing-library/jest-dom": "^5.12.0", "classnames": "^2.2.6", "formik": "^2.1.4", "lodash.debounce": "^4.0.8", @@ -48,8 +46,8 @@ "prop-types": "^15.7.2", "react": "^17.0.2", "react-content-loader": "^6.2.0", - "react-router": "^5.2.0", "react-joyride": "^2.5.3", + "react-router": "^5.2.0", "react-router-dom": "^5.2.0", "react-transition-group": "4.4.2", "embla-carousel-react": "^8.0.0-rc07" @@ -72,8 +70,8 @@ "@types/react-router-dom": "^5.1.6", "babel-core": "^6.26.3", "babel-loader": "^8.1.0", - "copy-webpack-plugin": "^9.0.1", "concurrently": "^5.3.0", + "copy-webpack-plugin": "^9.0.1", "cross-env": "^5.2.0", "css-loader": "^5.0.1", "css-minimizer-webpack-plugin": "^3.0.1", diff --git a/packages/appstore/src/components/transaction-list/transaction-list.tsx b/packages/appstore/src/components/transaction-list/transaction-list.tsx index 264b75945128..fdb1745e7b32 100644 --- a/packages/appstore/src/components/transaction-list/transaction-list.tsx +++ b/packages/appstore/src/components/transaction-list/transaction-list.tsx @@ -20,7 +20,7 @@ const TransactionList = () => { text: localize('All'), value: '', }, - ...(wallet.is_virtual + ...(wallet?.is_virtual ? ([ { text: localize('Reset balance'), diff --git a/packages/appstore/src/components/wallet-content/wallet-content.tsx b/packages/appstore/src/components/wallet-content/wallet-content.tsx index 37fcec0e9b8b..43d517ca8e9b 100644 --- a/packages/appstore/src/components/wallet-content/wallet-content.tsx +++ b/packages/appstore/src/components/wallet-content/wallet-content.tsx @@ -12,8 +12,6 @@ type TProps = { }; const WalletContent = ({ wallet_account }: TProps) => { - const is_malta_wallet = wallet_account.is_malta_wallet; - return (
{ - {is_malta_wallet && !wallet_account.is_demo && ( + {wallet_account.is_malta_wallet && !wallet_account.is_demo && ( { +}: TRootStore['common']['error']) => { const history = useHistory(); React.useEffect(() => { diff --git a/packages/cashier/src/pages/account-transfer/__tests__/account-transfer.spec.tsx b/packages/cashier/src/pages/account-transfer/__tests__/account-transfer.spec.tsx index 4ba568e8ad96..85e2d8a58c4b 100644 --- a/packages/cashier/src/pages/account-transfer/__tests__/account-transfer.spec.tsx +++ b/packages/cashier/src/pages/account-transfer/__tests__/account-transfer.spec.tsx @@ -5,7 +5,7 @@ import { useCashierLocked, useDepositLocked } from '@deriv/hooks'; import { createBrowserHistory } from 'history'; import AccountTransfer from '../account-transfer'; import CashierProviders from '../../../cashier-providers'; -import { mockStore, TStores } from '@deriv/stores'; +import { mockStore } from '@deriv/stores'; jest.mock('@deriv/shared/src/services/ws-methods', () => ({ __esModule: true, @@ -62,7 +62,7 @@ describe('', () => { onClose: jest.fn(), }; - const renderAccountTransfer = (store: TStores) => { + const renderAccountTransfer = (store: ReturnType) => { render(, { wrapper: ({ children }) => {children}, }); diff --git a/packages/cashier/src/pages/on-ramp/__tests__/on-ramp.spec.tsx b/packages/cashier/src/pages/on-ramp/__tests__/on-ramp.spec.tsx index 12722db31390..96ded5522e8f 100644 --- a/packages/cashier/src/pages/on-ramp/__tests__/on-ramp.spec.tsx +++ b/packages/cashier/src/pages/on-ramp/__tests__/on-ramp.spec.tsx @@ -3,9 +3,9 @@ import { fireEvent, render, screen } from '@testing-library/react'; import { isMobile, routes } from '@deriv/shared'; import { useCashierLocked, useDepositLocked } from '@deriv/hooks'; import OnRamp from '../on-ramp'; +import { mockStore } from '@deriv/stores'; import type { TOnRampProps } from '../on-ramp'; import CashierProviders from '../../../cashier-providers'; -import { mockStore, TStores } from '@deriv/stores'; jest.mock('@deriv/hooks', () => ({ ...jest.requireActual('@deriv/hooks'), @@ -94,17 +94,16 @@ describe('', () => { mockUseDepositLocked.mockReturnValue(false); mockUseCashierLocked.mockReturnValue(false); }); - const renderOnRamp = (mocked_store: TStores, is_rerender = false) => { - const ui = ( + const mockOnRamp = (mocked_store: ReturnType, is_rerender = false) => { + return ( ); - return is_rerender ? ui : render(ui); }; it('should render component', () => { - const mockRootStore = mockStore({ + const mock = mockStore({ client: { account_status: { status: [] }, mt5_login_list: [ @@ -124,16 +123,18 @@ describe('', () => { }, }, }); - const { rerender } = renderOnRamp(mockRootStore) as ReturnType; + const { rerender } = render(mockOnRamp(mock)); + expect(screen.getByText('Loading')).toBeInTheDocument(); - mockRootStore.modules.cashier.general_store.is_loading = false; - mockRootStore.client.is_switching = true; - rerender(renderOnRamp(mockRootStore, true) as JSX.Element); + mock.modules.cashier.general_store.is_loading = false; + mock.client.is_switching = true; + rerender(mockOnRamp(mock)); expect(screen.getByText('Loading')).toBeInTheDocument(); }); it('should render component', () => { - const mockRootStore = mockStore({ + (useCashierLocked as jest.Mock).mockReturnValue(true); + const mock = mockStore({ client: { account_status: { status: [] }, mt5_login_list: [ @@ -145,16 +146,19 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - mockUseCashierLocked.mockReturnValue(true); - const { rerender } = renderOnRamp(mockRootStore) as ReturnType; + const { rerender } = render(mockOnRamp(mock)); + expect(screen.getByText('CashierLocked')).toBeInTheDocument(); - mockUseDepositLocked.mockReturnValue(true); - rerender(renderOnRamp(mockRootStore, true) as JSX.Element); + + (useCashierLocked as jest.Mock).mockReturnValue(false); + (useDepositLocked as jest.Mock).mockReturnValue(true); + rerender(mockOnRamp(mock)); + expect(screen.getByText('CashierLocked')).toBeInTheDocument(); }); it('should render component and "Select payment channel" message', () => { - const mockRootStore = mockStore({ + const mock = mockStore({ client: { account_status: { status: [] }, mt5_login_list: [ @@ -166,7 +170,8 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - renderOnRamp(mockRootStore); + render(mockOnRamp(mock)); + expect(screen.getByText('Select payment channel')).toBeInTheDocument(); expect(screen.getByText('OnRampProviderCard')).toBeInTheDocument(); }); @@ -175,7 +180,7 @@ describe('', () => { const modal_root_el = document.createElement('div'); modal_root_el.setAttribute('id', 'modal_root'); document.body.appendChild(modal_root_el); - const mockRootStore = mockStore({ + const mock = mockStore({ client: { account_status: { status: [] }, mt5_login_list: [ @@ -195,7 +200,8 @@ describe('', () => { }, }, }); - renderOnRamp(mockRootStore); + render(mockOnRamp(mock)); + expect(screen.getByText('Title of the onramp popup modal')).toBeInTheDocument(); expect(screen.getByText('OnRampProviderPopup')).toBeInTheDocument(); document.body.removeChild(modal_root_el); @@ -205,7 +211,7 @@ describe('', () => { const modal_root_el = document.createElement('div'); modal_root_el.setAttribute('id', 'modal_root'); document.body.appendChild(modal_root_el); - const mockRootStore = mockStore({ + const mock = mockStore({ client: { account_status: { status: [] }, mt5_login_list: [ @@ -225,15 +231,16 @@ describe('', () => { }, }, }); - renderOnRamp(mockRootStore); + render(mockOnRamp(mock)); const close_cross_btn = screen.getByRole('button', { name: '' }); fireEvent.click(close_cross_btn); - expect(mockRootStore.modules.cashier.onramp.setIsOnRampModalOpen).toHaveBeenCalledWith(false); + + expect(mock.modules.cashier.onramp.setIsOnRampModalOpen).toHaveBeenCalledWith(false); document.body.removeChild(modal_root_el); }); it('should trigger "setSideNotes" callback in Desktop mode', () => { - const mockRootStore = mockStore({ + const mock = mockStore({ client: { account_status: { status: [] }, mt5_login_list: [ @@ -245,13 +252,14 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - renderOnRamp(mockRootStore); + render(mockOnRamp(mock)); + expect(props.setSideNotes).toHaveBeenCalledTimes(1); }); it('should show "What is Fiat onramp?" message and render component in Mobile mode', () => { (isMobile as jest.Mock).mockReturnValue(true); - const mockRootStore = mockStore({ + const mock = mockStore({ client: { account_status: { status: [] }, mt5_login_list: [ @@ -263,14 +271,15 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - renderOnRamp(mockRootStore); + render(mockOnRamp(mock)); + expect(screen.getByText('What is Fiat onramp?')).toBeInTheDocument(); expect(screen.getByText('ReadMore')).toBeInTheDocument(); }); it('should have proper menu options in Mobile mode', () => { (isMobile as jest.Mock).mockReturnValue(true); - const mockRootStore = mockStore({ + const mock = mockStore({ client: { account_status: { status: [] }, mt5_login_list: [ @@ -282,7 +291,8 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - renderOnRamp(mockRootStore); + render(mockOnRamp(mock)); + const select = screen.getByTestId('dt_on_ramp_select_native'); const labels = Array.from(select as any).map((option: any) => option.label); @@ -306,7 +316,7 @@ describe('', () => { path: routes.cashier_onramp, }, ]; - const mockRootStore = mockStore({ + const mock = mockStore({ client: { account_status: { status: [] }, mt5_login_list: [ @@ -318,9 +328,10 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - renderOnRamp(mockRootStore); + render(mockOnRamp(mock)); const select = screen.getByTestId('dt_on_ramp_select_native'); fireEvent.change(select, { target: { value: routes.cashier_deposit } }); - expect(mockRootStore.common.routeTo).toHaveBeenCalledTimes(1); + + expect(mock.common.routeTo).toHaveBeenCalledTimes(1); }); }); diff --git a/packages/cashier/src/pages/payment-agent-transfer/__tests__/payment-agent-transfer.spec.tsx b/packages/cashier/src/pages/payment-agent-transfer/__tests__/payment-agent-transfer.spec.tsx index ec665ed265bc..208758a6ca7d 100644 --- a/packages/cashier/src/pages/payment-agent-transfer/__tests__/payment-agent-transfer.spec.tsx +++ b/packages/cashier/src/pages/payment-agent-transfer/__tests__/payment-agent-transfer.spec.tsx @@ -5,7 +5,7 @@ import { createBrowserHistory } from 'history'; import PaymentAgentTransfer from '../payment-agent-transfer'; import CashierProviders from '../../../cashier-providers'; import { useCashierLocked } from '@deriv/hooks'; -import { mockStore, TStores } from '@deriv/stores'; +import { mockStore } from '@deriv/stores'; jest.mock('@deriv/components', () => { const original_module = jest.requireActual('@deriv/components'); @@ -66,7 +66,7 @@ describe('', () => { mockUseCashierLocked.mockReturnValue(false); }); - const renderPaymentAgentTransfer = (mock_root_store: TStores) => { + const renderPaymentAgentTransfer = (mock_root_store: ReturnType) => { return render( diff --git a/packages/cashier/src/pages/payment-agent/__tests__/payment-agent.spec.tsx b/packages/cashier/src/pages/payment-agent/__tests__/payment-agent.spec.tsx index 70717646cfa5..662e66751cd5 100644 --- a/packages/cashier/src/pages/payment-agent/__tests__/payment-agent.spec.tsx +++ b/packages/cashier/src/pages/payment-agent/__tests__/payment-agent.spec.tsx @@ -4,8 +4,8 @@ import { Router } from 'react-router'; import { createBrowserHistory } from 'history'; import PaymentAgent from '../payment-agent'; import CashierProviders from '../../../cashier-providers'; +import { mockStore } from '@deriv/stores'; import { useCashierLocked } from '@deriv/hooks'; -import { mockStore, TStores } from '@deriv/stores'; jest.mock('@deriv/components', () => { const original_module = jest.requireActual('@deriv/components'); @@ -38,7 +38,7 @@ const cashier_mock = { }; describe('', () => { - const renderPaymentAgent = (mock_root_store: TStores) => { + const renderPaymentAgent = (mock_root_store: ReturnType) => { return render( diff --git a/packages/cashier/src/pages/withdrawal/__tests__/withdrawal.spec.tsx b/packages/cashier/src/pages/withdrawal/__tests__/withdrawal.spec.tsx index 86a594f55edd..5e7b37a6015b 100644 --- a/packages/cashier/src/pages/withdrawal/__tests__/withdrawal.spec.tsx +++ b/packages/cashier/src/pages/withdrawal/__tests__/withdrawal.spec.tsx @@ -5,7 +5,7 @@ import { createBrowserHistory } from 'history'; import { isDesktop } from '@deriv/shared'; import Withdrawal from '../withdrawal'; import CashierProviders from '../../../cashier-providers'; -import { mockStore, TStores } from '@deriv/stores'; +import { mockStore } from '@deriv/stores'; import { useCashierLocked } from '@deriv/hooks'; jest.mock('Components/cashier-locked', () => jest.fn(() => 'CashierLocked')); @@ -68,15 +68,14 @@ describe('', () => { mockUseCashierLocked.mockReturnValue(false); }); - const renderWithdrawal = (mock_root_store: TStores, is_rerender = false) => { - const ui = ( + const mockWithdrawal = (mock_root_store: ReturnType, is_rerender = false) => { + return ( ); - return is_rerender ? ui : render(ui); }; it('should render component', () => { @@ -97,7 +96,7 @@ describe('', () => { }, }, }); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(screen.getByText('CashierLocked')).toBeInTheDocument(); }); @@ -118,7 +117,7 @@ describe('', () => { }, }, }); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(screen.getByText('Loading')).toBeInTheDocument(); }); @@ -132,7 +131,7 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(screen.getByText('Virtual')).toBeInTheDocument(); }); @@ -146,7 +145,7 @@ describe('', () => { modules: { cashier: cashier_mock }, }); mockUseCashierLocked.mockReturnValue(true); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(screen.getByText('CashierLocked')).toBeInTheDocument(); }); @@ -167,12 +166,12 @@ describe('', () => { }, }, }); - renderWithdrawal(mock_root_store); + const { rerender } = render(mockWithdrawal(mock_root_store)); expect(screen.getByText('WithdrawalLocked')).toBeInTheDocument(); mock_root_store.modules.cashier.withdraw.is_10k_withdrawal_limit_reached = true; - renderWithdrawal(mock_root_store, true); + rerender(mockWithdrawal(mock_root_store)); expect(screen.getByText('WithdrawalLocked')).toBeInTheDocument(); }); @@ -185,7 +184,7 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(screen.getByText('NoBalance')).toBeInTheDocument(); }); @@ -210,12 +209,12 @@ describe('', () => { }, }, }); - const { rerender } = renderWithdrawal(mock_root_store) as ReturnType; + const { rerender } = render(mockWithdrawal(mock_root_store)); expect(screen.getByText('Error')).toBeInTheDocument(); mock_root_store.modules.cashier.withdraw.verification.error = { message: 'Error message' }; - rerender(renderWithdrawal(mock_root_store, true) as JSX.Element); + rerender(mockWithdrawal(mock_root_store)); expect(screen.getByText('Error')).toBeInTheDocument(); }); @@ -229,11 +228,12 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - const { rerender } = renderWithdrawal(mock_root_store) as ReturnType; + + const { rerender } = render(mockWithdrawal(mock_root_store)); expect(screen.getByText('Withdraw')).toBeInTheDocument(); mock_root_store.modules.cashier.iframe.iframe_url = 'coiframe_urlde'; - rerender(renderWithdrawal(mock_root_store, true) as JSX.Element); + rerender(mockWithdrawal(mock_root_store)); expect(screen.getByText('Withdraw')).toBeInTheDocument(); }); @@ -255,7 +255,7 @@ describe('', () => { }, }, }); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(screen.getByText('CryptoWithdrawForm')).toBeInTheDocument(); }); @@ -276,7 +276,7 @@ describe('', () => { }, }, }); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(screen.getByText('CryptoWithdrawReceipt')).toBeInTheDocument(); }); @@ -297,7 +297,7 @@ describe('', () => { }, }, }); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(screen.getByText('CryptoTransactionsHistory')).toBeInTheDocument(); }); @@ -310,7 +310,7 @@ describe('', () => { }, modules: { cashier: cashier_mock }, }); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(screen.getByText('WithdrawalVerificationEmail')).toBeInTheDocument(); }); @@ -335,7 +335,7 @@ describe('', () => { }); (isDesktop as jest.Mock).mockReturnValueOnce(false); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(setSideNotes).not.toHaveBeenCalled(); }); @@ -356,7 +356,7 @@ describe('', () => { }, }, }); - renderWithdrawal(mock_root_store); + render(mockWithdrawal(mock_root_store)); expect(setSideNotes).toHaveBeenCalledTimes(1); }); diff --git a/packages/cashier/src/stores/general-store.ts b/packages/cashier/src/stores/general-store.ts index 7061c55ee9c4..a48b341fc38b 100644 --- a/packages/cashier/src/stores/general-store.ts +++ b/packages/cashier/src/stores/general-store.ts @@ -131,7 +131,7 @@ export default class GeneralStore extends BaseStore { if (is_logged_in) { if (!switched) { - payment_agent.setPaymentAgentList().then(payment_agent.filterPaymentAgentList); + payment_agent.setPaymentAgentList().then(() => payment_agent.filterPaymentAgentList()); // check if withdrawal limit is reached // if yes, this will trigger to show a notification await withdraw.check10kLimit(); diff --git a/packages/cfd/package.json b/packages/cfd/package.json index 98e4569f2e1c..a8387e816c37 100644 --- a/packages/cfd/package.json +++ b/packages/cfd/package.json @@ -83,7 +83,7 @@ }, "dependencies": { "@deriv/account": "^1.0.0", - "@deriv/api-types": "^1.0.94", + "@deriv/api-types": "^1.0.112", "@deriv/components": "^1.0.0", "@deriv/deriv-api": "^1.0.13", "@deriv/shared": "^1.0.0", diff --git a/packages/hooks/package.json b/packages/hooks/package.json index a9b3efc582a9..a008e8fe3a29 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -5,11 +5,9 @@ "main": "src/index.ts", "dependencies": { "@deriv/api": "^1.0.0", - "@deriv/api-types": "^1.0.94", "@deriv/stores": "^1.0.0", "@deriv/utils": "^1.0.0", - "react": "^17.0.2", - "moment": "^2.29.2" + "react": "^17.0.2" }, "devDependencies": { "typescript": "^4.6.3", diff --git a/packages/hooks/src/__tests__/useAuthorize.spec.tsx b/packages/hooks/src/__tests__/useAuthorize.spec.tsx index 341811b09c8f..39b90ee4f937 100644 --- a/packages/hooks/src/__tests__/useAuthorize.spec.tsx +++ b/packages/hooks/src/__tests__/useAuthorize.spec.tsx @@ -1,36 +1,30 @@ import React from 'react'; -import { APIProvider, useFetch } from '@deriv/api'; +import { APIProvider } from '@deriv/api'; import { renderHook } from '@testing-library/react-hooks'; import { StoreProvider, mockStore } from '@deriv/stores'; import useAuthorize from '../useAuthorize'; jest.mock('@deriv/api', () => ({ ...jest.requireActual('@deriv/api'), - useFetch: jest.fn(), + useFetch: jest.fn((_, options: Record<'payload', Record<'authorize', string>>) => ({ + data: { + authorize: { + loginid: options.payload.authorize === '12345' ? 'CRW909900' : 'CRW909901', + account_list: [ + { + account_category: 'wallet', + currency: 'USD', + is_virtual: 0, + }, + ], + }, + }, + })), })); -const mockUseFetch = useFetch as jest.MockedFunction>; - describe('useAuthorize', () => { - test('should return wallets list for the current loginid', () => { - const mock = mockStore({ - client: { accounts: { CRW909900: { token: '12345' } }, loginid: 'CRW909900' }, - }); - - // @ts-expect-error Need to update @deriv/api-types to fix the TS error - mockUseFetch.mockReturnValue({ - data: { - authorize: { - account_list: [ - { - account_category: 'wallet', - currency: 'USD', - is_virtual: 0, - }, - ], - }, - }, - }); + test('should return correct data for the given token', () => { + const mock = mockStore({ client: { accounts: { CRW909900: { token: '12345' } }, loginid: 'CRW909900' } }); const wrapper = ({ children }: { children: JSX.Element }) => ( @@ -40,8 +34,7 @@ describe('useAuthorize', () => { const { result } = renderHook(() => useAuthorize(), { wrapper }); - expect(result.current.data).toEqual({ - authorize: { account_list: [{ account_category: 'wallet', currency: 'USD', is_virtual: 0 }] }, - }); + expect(result.current.data.loginid).toBe('CRW909900'); + expect(result.current.data.loginid).not.toBe('CRW909901'); }); }); diff --git a/packages/hooks/src/__tests__/useWalletsList.spec.tsx b/packages/hooks/src/__tests__/useWalletsList.spec.tsx index d6fe010b558a..ce52339a331b 100644 --- a/packages/hooks/src/__tests__/useWalletsList.spec.tsx +++ b/packages/hooks/src/__tests__/useWalletsList.spec.tsx @@ -1,124 +1,86 @@ import * as React from 'react'; -import { APIProvider, useFetch } from '@deriv/api'; +import { APIProvider } from '@deriv/api'; import { StoreProvider, mockStore } from '@deriv/stores'; import { renderHook } from '@testing-library/react-hooks'; import useWalletsList from '../useWalletsList'; jest.mock('@deriv/api', () => ({ ...jest.requireActual('@deriv/api'), - useFetch: jest.fn(), -})); - -const mockUseFetch = useFetch as jest.MockedFunction>; - -describe('useWalletsList', () => { - test('should return wallets list for the current loginid', () => { - const mock = mockStore({ - client: { - accounts: { CRW909900: { token: '12345' } }, - currency: 'USD', - loginid: 'CRW909900', - is_crypto: () => false, - }, - }); - - // @ts-expect-error need to come up with a way to mock the return type of useFetch - mockUseFetch.mockReturnValue({ - data: { - authorize: { - account_list: [ - { - account_category: 'wallet', - currency: 'USD', - is_virtual: 0, - landing_company_name: 'svg', - }, - ], + useFetch: jest.fn((name: string) => { + if (name === 'authorize') { + return { + data: { + authorize: { + account_list: [ + { + account_category: 'wallet', + currency: 'USD', + is_virtual: 0, + }, + { + account_category: 'trading', + currency: 'USD', + is_virtual: 0, + }, + { + account_category: 'wallet', + currency: 'UST', + is_virtual: 0, + }, + { + account_category: 'wallet', + currency: 'BTC', + is_virtual: 1, + }, + { + account_category: 'wallet', + currency: 'AUD', + is_virtual: 0, + }, + { + account_category: 'wallet', + currency: 'ETH', + is_virtual: 0, + }, + ], + }, }, - }, - }); - - const wrapper = ({ children }: { children: JSX.Element }) => ( - - {children} - - ); - - const { result } = renderHook(() => useWalletsList(), { wrapper }); - - expect(result.current.data).toEqual([ - { - account_category: 'wallet', - balance: 0, - currency: 'USD', - gradient_card_class: 'wallet-card__usd-bg', - gradient_header_class: 'wallet-header__usd-bg', - is_added: true, - landing_company_name: 'svg', - icon: 'IcWalletCurrencyUsd', - is_demo: false, - is_malta_wallet: false, - is_selected: false, - is_virtual: false, - name: 'USD Wallet', - is_disabled: false, - }, - ]); - }); - - test('should return empty array if there is no wallets list', () => { - const mock = mockStore({ - client: { accounts: { CRW909900: { token: '12345' } }, loginid: 'CRW909900' }, - }); - - // @ts-expect-error need to come up with a way to mock the return type of useFetch - mockUseFetch.mockReturnValue({ data: { authorize: { account_list: [] } } }); - - const wrapper = ({ children }: { children: JSX.Element }) => ( - - {children} - - ); - - const { result } = renderHook(() => useWalletsList(), { wrapper }); - - expect(result.current.data).toEqual([]); - }); - - test('should return alphabetically sorted wallet list based on currency', () => { - const mock = mockStore({ - client: { accounts: { CRW909900: { token: '12345' } }, loginid: 'CRW909900' }, - }); - - // @ts-expect-error Need to update @deriv/api-types to fix the TS error - mockUseFetch.mockReturnValue({ - data: { - authorize: { - account_list: [ - { - account_category: 'wallet', - currency: 'USD', - is_virtual: 0, - }, - { - account_category: 'wallet', - currency: 'UST', - is_virtual: 0, + }; + } else if (name === 'balance') { + return { + data: { + balance: { + accounts: { + CRW909900: { + balance: 0, + }, }, - { - account_category: 'wallet', - currency: 'BTC', - is_virtual: 0, - }, - { - account_category: 'wallet', - currency: 'AUD', - is_virtual: 0, + }, + }, + }; + } else if (name === 'website_status') { + return { + data: { + website_status: { + currencies_config: { + AUD: { type: 'fiat' }, + BTC: { type: 'crypto' }, + ETH: { type: 'crypto' }, + UST: { type: 'crypto' }, + USD: { type: 'fiat' }, }, - ], + }, }, - }, - }); + }; + } + + return undefined; + }), +})); + +describe('useWalletsList', () => { + test('should return wallets list for the current loginid', () => { + const mock = mockStore({ client: { accounts: { CRW909900: { token: '12345' } }, loginid: 'CRW909900' } }); const wrapper = ({ children }: { children: JSX.Element }) => ( @@ -128,52 +90,11 @@ describe('useWalletsList', () => { const { result } = renderHook(() => useWalletsList(), { wrapper }); - expect(result.current.data?.map(wallet => wallet.currency)).toEqual(['AUD', 'BTC', 'USD', 'UST']); + expect(result.current.data?.every(wallet => wallet.account_category === 'wallet')).toEqual(true); }); test('should return sorted wallet list where virtual is the last and crypto is after fiat currency', () => { - const mock = mockStore({ - client: { - accounts: { CRW909900: { token: '12345' } }, - loginid: 'CRW909900', - is_crypto: (currency: string) => ['BTC', 'ETH', 'UST'].includes(currency), - }, - }); - - // @ts-expect-error Need to update @deriv/api-types to fix the TS error - mockUseFetch.mockReturnValue({ - data: { - authorize: { - account_list: [ - { - account_category: 'wallet', - currency: 'USD', - is_virtual: 0, - }, - { - account_category: 'wallet', - currency: 'UST', - is_virtual: 0, - }, - { - account_category: 'wallet', - currency: 'BTC', - is_virtual: 1, - }, - { - account_category: 'wallet', - currency: 'AUD', - is_virtual: 0, - }, - { - account_category: 'wallet', - currency: 'ETH', - is_virtual: 0, - }, - ], - }, - }, - }); + const mock = mockStore({ client: { accounts: { CRW909900: { token: '12345' } }, loginid: 'CRW909900' } }); const wrapper = ({ children }: { children: JSX.Element }) => ( diff --git a/packages/hooks/src/index.ts b/packages/hooks/src/index.ts index 6d884296cce2..6015c7696875 100644 --- a/packages/hooks/src/index.ts +++ b/packages/hooks/src/index.ts @@ -1,9 +1,11 @@ export { default as useAccountTransferVisible } from './useAccountTransferVisible'; -export { default as useCashierLocked } from './useCashierLocked'; +export { default as useActiveWallet } from './useActiveWallet'; export { default as useCFDAccounts } from './useCFDAccounts'; export { default as useCFDAllAccounts } from './useCFDAllAccounts'; export { default as useCFDDemoAccounts } from './useCFDDemoAccounts'; export { default as useCFDRealAccounts } from './useCFDRealAccounts'; +export { default as useCashierLocked } from './useCashierLocked'; +export { default as useContentFlag } from './useContentFlag'; export { default as useCountdown } from './useCountdown'; export { default as useCurrencyConfig } from './useCurrencyConfig'; export { default as useDepositCryptoAddress } from './useDepositCryptoAddress'; @@ -39,9 +41,7 @@ export { default as usePlatformRealAccounts } from './usePlatformRealAccounts'; export { default as useRealSTPAccount } from './useRealSTPAccount'; export { default as useTotalAccountBalance } from './useTotalAccountBalance'; export { default as useVerifyEmail } from './useVerifyEmail'; -export { default as useContentFlag } from './useContentFlag'; export { default as useWalletsList } from './useWalletsList'; export { default as useAvailableWallets } from './useAvailableWallets'; export { default as useAuthorize } from './useAuthorize'; export { default as useWalletTransactions } from './useWalletTransactions'; -export { default as useActiveWallet } from './useActiveWallet'; diff --git a/packages/hooks/src/useActiveWallet.ts b/packages/hooks/src/useActiveWallet.ts index 202c155b696b..bb238eb3f727 100644 --- a/packages/hooks/src/useActiveWallet.ts +++ b/packages/hooks/src/useActiveWallet.ts @@ -1,10 +1,12 @@ +import { useMemo } from 'react'; import useWalletsList from './useWalletsList'; /** A custom hook that returns the wallet object for the current active wallet. */ const useActiveWallet = () => { - const { data: wallet_list } = useWalletsList(); - const active_wallet = wallet_list?.find(wallet => wallet.is_selected); + const { data } = useWalletsList(); + const active_wallet = useMemo(() => data?.find(wallet => wallet.is_selected), [data]); + /** User's current active wallet. */ return active_wallet; }; diff --git a/packages/hooks/src/useAuthorize.ts b/packages/hooks/src/useAuthorize.ts index 958def46feb4..7f3d3b9e0408 100644 --- a/packages/hooks/src/useAuthorize.ts +++ b/packages/hooks/src/useAuthorize.ts @@ -1,14 +1,23 @@ +import { useMemo } from 'react'; import { useFetch } from '@deriv/api'; import { useStore } from '@deriv/stores'; -const useAuthorize = () => { +/** A custom hook that authorize the user with the given token. If no token is given, it will use the current token. */ +const useAuthorize = (token?: string) => { const { client } = useStore(); const { accounts, loginid = '' } = client; + const current_token = accounts[loginid || ''].token; - return useFetch('authorize', { - payload: { authorize: accounts[loginid]?.token || '' }, - options: { enabled: !!loginid }, - }); + const { data, ...rest } = useFetch('authorize', { payload: { authorize: token || current_token } }); + + // Add additional information to the authorize response. + const modified_authorize = useMemo(() => ({ ...data?.authorize }), [data?.authorize]); + + return { + /** The authorize response. */ + data: modified_authorize, + ...rest, + }; }; export default useAuthorize; diff --git a/packages/hooks/src/useAvailableWallets.ts b/packages/hooks/src/useAvailableWallets.ts index 128ab938298d..3ef2c878926f 100644 --- a/packages/hooks/src/useAvailableWallets.ts +++ b/packages/hooks/src/useAvailableWallets.ts @@ -12,8 +12,8 @@ const useAvailableWallets = () => { // @ts-expect-error Need to update @deriv/api-types to fix the TS error const { data: account_type_data, ...rest } = useFetch('get_account_types', { - payload: { company: data?.authorize?.landing_company_name }, - options: { enabled: Boolean(data?.authorize?.landing_company_name) }, + payload: { company: data?.landing_company_name }, + options: { enabled: Boolean(data?.landing_company_name) }, }); const { data: added_wallets } = useWalletsList(); @@ -32,7 +32,7 @@ const useAvailableWallets = () => { const modified_wallets = non_virtual_wallets?.map(wallet => ({ currency: wallet.currency, landing_company_name: wallet.landing_company_name, - is_added: wallet.is_added, + is_added: true, gradient_card_class: wallet.gradient_card_class, })); @@ -40,7 +40,7 @@ const useAvailableWallets = () => { .filter(currency => !modified_wallets?.some(wallet => wallet.currency === currency)) .map(currency => ({ currency, - landing_company_name: data?.authorize?.landing_company_name, + landing_company_name: data?.landing_company_name, is_added: false, gradient_card_class: `wallet-card__${currency.toLowerCase()}-bg${is_dark_mode_on ? '--dark' : ''}`, })); @@ -67,7 +67,7 @@ const useAvailableWallets = () => { } return [...available_wallets]; - }, [added_wallets, account_type_data, data?.authorize?.landing_company_name, is_dark_mode_on, is_crypto]); + }, [added_wallets, account_type_data, data?.landing_company_name, is_dark_mode_on, is_crypto]); return { ...rest, diff --git a/packages/hooks/src/useWalletTransactions.ts b/packages/hooks/src/useWalletTransactions.ts index b764b7ff8de6..d10964d7ae54 100644 --- a/packages/hooks/src/useWalletTransactions.ts +++ b/packages/hooks/src/useWalletTransactions.ts @@ -2,7 +2,7 @@ import { useStore } from '@deriv/stores'; import { getWalletCurrencyIcon } from '@deriv/utils'; import useCurrencyConfig from './useCurrencyConfig'; import usePlatformAccounts from './usePlatformAccounts'; -import useWalletList from './useWalletsList'; +import useWalletsList from './useWalletsList'; import useActiveWallet from './useActiveWallet'; import { useMemo } from 'react'; @@ -13,7 +13,7 @@ const useWalletTransactions = ( client: { loginid, landing_company_shortcode: shortcode }, ui: { is_dark_mode_on }, } = useStore(); - const { data: wallets } = useWalletList(); + const { data: wallets } = useWalletsList(); const current_wallet = useActiveWallet(); let { demo: demo_platform_account } = usePlatformAccounts(); const { real: real_platform_accounts } = usePlatformAccounts(); @@ -42,18 +42,18 @@ const useWalletTransactions = ( account_type: 'crypto', balance: 0, currency: 'BTC', - gradient_header_class: '', + gradient_header_class: 'wallet-header__btc-bg', gradient_card_class: `wallet-card__btc-bg${is_dark_mode_on ? '--dark' : ''}`, - icon: getWalletCurrencyIcon('BTC', is_dark_mode_on), is_demo: !!current_wallet.is_virtual, - is_disabled: false, + is_disabled: 0, is_malta_wallet: false, is_selected: false, - is_virtual: Boolean(current_wallet.is_virtual), + is_virtual: current_wallet.is_virtual, landing_company_name: 'svg', loginid: 'CRWMOCK00042', - name: `${current_wallet.is_virtual ? 'Demo ' : ''}BTC Wallet`, - is_added: true, + currency_config: undefined, + icon: 'IcWalletCurrencyBtc', + wallet_currency_type: 'BTC', }); const accounts = [demo_platform_account, ...real_platform_accounts]; const { getConfig } = useCurrencyConfig(); @@ -256,12 +256,18 @@ const useWalletTransactions = ( transaction.action_type === undefined ) return null; + let account_category = 'wallet'; let account_type = current_wallet.account_type; - let account_name = current_wallet.name; + let account_name = `${current_wallet.is_virtual ? 'Demo ' : ''}${ + current_wallet.currency + } ${'Wallet'}`; let account_currency = current_wallet.currency; let gradient_class = current_wallet.gradient_card_class; - let icon = current_wallet.icon; + let icon = getWalletCurrencyIcon( + current_wallet.is_virtual ? 'demo' : current_wallet.currency || 'USD', + is_dark_mode_on + ); if (transaction.action_type === 'transfer') { const other_loginid = transaction.to?.loginid === loginid @@ -274,11 +280,21 @@ const useWalletTransactions = ( account_currency = other_account.currency; account_name = other_account.account_category === 'wallet' - ? ( - wallets.find( - el => el.loginid === other_account.loginid - ) as typeof wallets[number] - ).name + ? `${ + ( + wallets.find( + el => el.loginid === other_account.loginid + ) as typeof wallets[number] + ).is_virtual + ? 'Demo ' + : '' + }${ + ( + wallets.find( + el => el.loginid === other_account.loginid + ) as typeof wallets[number] + ).currency + } ${'Wallet'}` : getTradingAccountName( other_account.account_type as 'standard' | 'mt5' | 'dxtrade' | 'binary', !!other_account.is_virtual, diff --git a/packages/hooks/src/useWalletsList.ts b/packages/hooks/src/useWalletsList.ts index f3fb931c60c8..7ee012ccd754 100644 --- a/packages/hooks/src/useWalletsList.ts +++ b/packages/hooks/src/useWalletsList.ts @@ -1,66 +1,143 @@ import { useMemo } from 'react'; -import { useStore } from '@deriv/stores'; -import { getWalletCurrencyIcon } from '@deriv/utils'; import { useFetch } from '@deriv/api'; +import { useStore } from '@deriv/stores'; import useAuthorize from './useAuthorize'; +import useCurrencyConfig from './useCurrencyConfig'; + +const currency_to_icon_mapper: Record> = { + Demo: { + dark: 'IcWalletDerivDemoDark', + light: 'IcWalletDerivDemoLight', + }, + USD: { + dark: 'IcWalletCurrencyUsd', + light: 'IcWalletCurrencyUsd', + }, + EUR: { + dark: 'IcWalletCurrencyEur', + light: 'IcWalletCurrencyEur', + }, + AUD: { + dark: 'IcWalletCurrencyAud', + light: 'IcWalletCurrencyAud', + }, + GBP: { + dark: 'IcWalletCurrencyGbp', + light: 'IcWalletCurrencyGbp', + }, + BTC: { + dark: 'IcWalletBitcoinDark', + light: 'IcWalletBitcoinLight', + }, + ETH: { + dark: 'IcWalletEthereumDark', + light: 'IcWalletEthereumLight', + }, + USDT: { + dark: 'IcWalletTetherDark', + light: 'IcWalletTetherLight', + }, + eUSDT: { + dark: 'IcWalletTetherDark', + light: 'IcWalletTetherLight', + }, + tUSDT: { + dark: 'IcWalletTetherDark', + light: 'IcWalletTetherLight', + }, + UST: { + dark: 'IcWalletTetherDark', + light: 'IcWalletTetherLight', + }, + LTC: { + dark: 'IcWalletLiteCoinDark', + light: 'IcWalletLiteCoinLight', + }, + USDC: { + dark: 'IcWalletUsdCoinDark', + light: 'IcWalletUsdCoinLight', + }, +}; +/** A custom hook to get the list of wallets for the current user. */ const useWalletsList = () => { const { client, ui } = useStore(); - const { loginid, is_crypto } = client; + const { loginid } = client; const { is_dark_mode_on } = ui; - const { data, ...rest } = useAuthorize(); + const { getConfig } = useCurrencyConfig(); + const { data: authorize_data, ...rest } = useAuthorize(); const { data: balance_data } = useFetch('balance', { payload: { account: 'all' } }); - const sortedWallets = useMemo(() => { - // Filter out accounts which has account_category as wallet - const wallets = data?.authorize?.account_list?.filter(account => account.account_category === 'wallet'); + // Filter out non-wallet accounts. + const wallets = useMemo( + () => authorize_data?.account_list?.filter(account => account.account_category === 'wallet'), + [authorize_data?.account_list] + ); + + // Add balance to each wallet. + const wallets_with_balance = useMemo( + () => + wallets?.map(wallet => ({ + ...wallet, + /** Wallet balance */ + balance: balance_data?.balance?.accounts?.[wallet.loginid || '']?.balance || 0, + })), + [balance_data?.balance?.accounts, wallets] + ); + + // Add additional information to each wallet. + const modified_wallets = useMemo(() => { + return wallets_with_balance?.map(wallet => { + const wallet_currency_type = wallet.is_virtual === 1 ? 'Demo' : wallet.currency || ''; + const wallet_gradient_class_name = `${wallet_currency_type.toLowerCase()}-bg${ + is_dark_mode_on ? '--dark' : '' + }`; + const wallet_icon = currency_to_icon_mapper[wallet_currency_type]; - // Modify the wallets to include the missing balance from the API response - // Should remove this once the API is fixed - const modified_wallets = wallets?.map(wallet => { - const wallet_currency = wallet.currency || ''; return { ...wallet, /** Indicating whether the wallet is the currently selected wallet. */ is_selected: wallet.loginid === loginid, /** Indicating whether the wallet is a virtual-money wallet. */ is_demo: wallet.is_virtual === 1, - /** Wallet balance */ - balance: balance_data?.balance?.accounts?.[wallet.loginid || '']?.balance || 0, - /** Landing company shortcode the account belongs to. Use this instead of landing_company_shortcode for wallets */ - landing_company_name: - wallet.landing_company_name === 'maltainvest' ? 'malta' : wallet.landing_company_name, - icon: getWalletCurrencyIcon(wallet.is_virtual ? 'demo' : wallet_currency, is_dark_mode_on), + /** Returns the wallet's currency type. ex: `Demo`, `USD`, etc. */ + wallet_currency_type, + /** Landing company shortcode the account belongs to. */ + landing_company_name: wallet.landing_company_name?.replace('maltainvest', 'malta'), + /** Indicating whether the wallet is a maltainvest wallet. */ is_malta_wallet: wallet.landing_company_name === 'malta', - gradient_header_class: `wallet-header__${ - wallet.is_virtual === 1 ? 'demo' : wallet_currency.toLowerCase() - }-bg${is_dark_mode_on ? '--dark' : ''}`, - gradient_card_class: `wallet-card__${ - wallet.is_virtual === 1 ? 'demo' : wallet_currency.toLowerCase() - }-bg${is_dark_mode_on ? '--dark' : ''}`, - name: `${wallet.is_virtual ? 'Demo ' : ''}${wallet_currency} Wallet`, - is_disabled: Boolean(wallet.is_disabled), - is_virtual: Boolean(wallet.is_virtual), - is_added: true, - }; + /** The gradient class name for the wallet header background. */ + gradient_header_class: `wallet-header__${wallet_gradient_class_name}`, + /** The gradient class name for the wallet card background. */ + gradient_card_class: `wallet-card__${wallet_gradient_class_name}`, + /** Wallet's currency config information */ + currency_config: wallet.currency ? getConfig(wallet.currency) : undefined, + /** Local asset name for the wallet icon. ex: `IcWalletCurrencyUsd` for `USD` */ + icon: is_dark_mode_on ? wallet_icon.dark : wallet_icon.light, + } as const; }); + }, [getConfig, is_dark_mode_on, loginid, wallets_with_balance]); + + // Sort wallets alphabetically by fiat, crypto, then virtual. + const sorted_wallets = useMemo(() => { + if (!modified_wallets) return undefined; - // Sort the wallets alphabetically by fiat, crypto, then virtual - return modified_wallets?.sort((a, b) => { + return [...modified_wallets].sort((a, b) => { if (a.is_virtual !== b.is_virtual) { return a.is_virtual ? 1 : -1; - } else if (is_crypto(a.currency) !== is_crypto(b.currency)) { - return is_crypto(a.currency) ? 1 : -1; + } else if (a.currency_config?.is_crypto !== b.currency_config?.is_crypto) { + return a.currency_config?.is_crypto ? 1 : -1; } return (a.currency || 'USD').localeCompare(b.currency || 'USD'); }); - }, [balance_data?.balance?.accounts, data?.authorize?.account_list, is_crypto, loginid, is_dark_mode_on]); + }, [modified_wallets]); return { + /** List of wallets for current user. */ + data: sorted_wallets, ...rest, - data: sortedWallets, }; }; diff --git a/packages/p2p/crowdin/messages.json b/packages/p2p/crowdin/messages.json index 89618358dc4e..1d61281e9780 100644 --- a/packages/p2p/crowdin/messages.json +++ b/packages/p2p/crowdin/messages.json @@ -1 +1,396 @@ -{"6794664":"Ads that match your Deriv P2P balance and limit.","19789721":"Nobody has blocked you. Yay!","24711354":"Total orders <0>30d | <1>lifetime","47573834":"Fixed rate (1 {{account_currency}})","50672601":"Bought","51881712":"You already have an ad with the same exchange rate for this currency pair and order type.

Please set a different rate for your ad.","55916349":"All","68867477":"Order ID {{ id }}","81450871":"We couldn’t find that page","121738739":"Send","122280248":"Avg release time <0>30d","134205943":"Your ads with fixed rates have been deactivated. Set floating rates to reactivate them.","140800401":"Float","145959105":"Choose a nickname","150156106":"Save changes","159757877":"You won't see {{advertiser_name}}'s ads anymore and they won't be able to place orders on your ads.","170072126":"Seen {{ duration }} days ago","173939998":"Avg. pay time <0>30d","197477687":"Edit {{ad_type}} ad","203271702":"Try again","231473252":"Preferred currency","233677840":"of the market rate","246815378":"Once set, your nickname cannot be changed.","276261353":"Avg pay time <0>30d","277542386":"Please use <0>live chat to contact our Customer Support team for help.","316725580":"You can no longer rate this transaction.","323002325":"Post ad","324970564":"Seller's contact details","338910048":"You will appear to other users as","358133589":"Unblock {{advertiser_name}}?","364681129":"Contact details","367579676":"Blocked","392469164":"You have blocked {{advertiser_name}}.","407600801":"Have you paid {{amount}} {{currency}} to {{other_user_name}}?","416167062":"You'll receive","424668491":"expired","439264204":"Please set a different minimum and/or maximum order limit.

The range of your ad should not overlap with any of your active ads.","452752527":"Rate (1 {{ currency }})","460477293":"Enter message","464044457":"Buyer's nickname","473688701":"Enter a valid amount","476023405":"Didn't receive the email?","488150742":"Resend email","498500965":"Seller's nickname","500514593":"Hide my ads","501523417":"You have no orders.","517202770":"Set fixed rate","523301614":"Release {{amount}} {{currency}}","525380157":"Buy {{offered_currency}} order","531912261":"Bank name, account number, beneficiary name","554135844":"Edit","555447610":"You won't be able to change your buy and sell limits again after this. Do you want to continue?","560402954":"User rating","565060416":"Exchange rate","580715136":"Please register with us!","587882987":"Advertisers","611376642":"Clear","612069973":"Would you recommend this buyer?","628581263":"The {{local_currency}} market rate has changed.","649549724":"I’ve not received any payment.","654193846":"The verification link appears to be invalid. Hit the button below to request for a new one","661808069":"Resend email {{remaining_time}}","662578726":"Available","683273691":"Rate (1 {{ account_currency }})","723172934":"Looking to buy or sell USD? You can post your own ad for others to respond.","728383001":"I’ve received more than the agreed amount.","733311523":"P2P transactions are locked. This feature is not available for payment agents.","767789372":"Wait for payment","782834680":"Time left","783454335":"Yes, remove","830703311":"My profile","834075131":"Blocked advertisers","838024160":"Bank details","842911528":"Don’t show this message again.","846659545":"Your ad is not listed on <0>Buy/Sell because the amount exceeds your daily limit of {{limit}} {{currency}}.\n <1 /><1 />You can still see your ad on <0>My ads. If you’d like to increase your daily limit, please contact us via <2>live chat.","847028402":"Check your email","858027714":"Seen {{ duration }} minutes ago","873437248":"Instructions (optional)","876086855":"Complete the financial assessment form","881351325":"Would you recommend this seller?","887667868":"Order","892431976":"If you cancel your order {{cancellation_limit}} times in {{cancellation_period}} hours, you will be blocked from using Deriv P2P for {{block_duration}} hours.
({{number_of_cancels_remaining}} cancellations remaining)","949859957":"Submit","954233511":"Sold","957529514":"To place an order, add one of the advertiser’s preferred payment methods:","957807235":"Blocking wasn't possible as {{name}} is not using Deriv P2P anymore.","988380202":"Your instructions","1001160515":"Sell","1002264993":"Seller's real name","1020552673":"You're creating an ad to buy <0>{{ target_amount }} {{ target_currency }}...","1030390916":"You already have an ad with this range","1035893169":"Delete","1052094244":"Max order","1056821534":"Are you sure?","1057127276":"{{- avg_release_time_in_minutes}} min","1065551550":"Set floating rate","1080990424":"Confirm","1089110190":"You accidentally gave us another email address (usually a work or a personal one instead of the one you meant).","1091533736":"Don't risk your funds with cash transactions. Use bank transfers or e-wallets instead.","1106073960":"You've created an ad","1106485202":"Available Deriv P2P balance","1109217274":"Success!","1119887091":"Verification","1121630246":"Block","1137964885":"Can only contain letters, numbers, and special characters .- _ @.","1151608942":"Total amount","1157877436":"{{field_name}} should not exceed Amount","1161621759":"Choose your nickname","1162965175":"Buyer","1163072833":"<0>ID verified","1191941618":"Enter a value that's within -{{limit}}% to +{{limit}}%","1192337383":"Seen {{ duration }} hour ago","1202500203":"Pay now","1228352589":"Not rated yet","1229976478":"You will be able to see {{ advertiser_name }}'s ads. They'll be able to place orders on your ads, too.","1236083813":"Your payment details","1258285343":"Oops, something went wrong","1265751551":"Deriv P2P Balance","1286797620":"Active","1287051975":"Nickname is too long","1300767074":"{{name}} is no longer on Deriv P2P","1303016265":"Yes","1313218101":"Rate this transaction","1314266187":"Joined today","1326475003":"Activate","1328352136":"Sell {{ account_currency }}","1330528524":"Seen {{ duration }} month ago","1337027601":"You sold {{offered_amount}} {{offered_currency}}","1347322213":"How would you rate this transaction?","1347724133":"I have paid {{amount}} {{currency}}.","1366244749":"Limits","1370999551":"Floating rate","1371193412":"Cancel","1381949324":"<0>Address verified","1398938904":"We can't deliver the email to this address (usually because of firewalls or filtering).","1422356389":"No results for \"{{text}}\".","1430413419":"Maximum is {{value}} {{currency}}","1438103743":"Floating rates are enabled for {{local_currency}}. Ads with fixed rates will be deactivated. Switch to floating rates by {{end_date}}.","1448855725":"Add payment methods","1452260922":"Too many failed attempts","1467483693":"Past orders","1474532322":"Sort by","1480915523":"Skip","1497156292":"No ads for this currency 😞","1505293001":"Trade partners","1568512719":"Your daily limits have been increased to {{daily_buy_limit}} {{currency}} (buy) and {{daily_sell_limit}} {{currency}} (sell).","1583335572":"If the ad doesn't receive an order for {{adverts_archive_period}} days, it will be deactivated.","1587250288":"Ad ID {{advert_id}} ","1607051458":"Search by nickname","1615530713":"Something's not right","1620858613":"You're editing an ad to sell <0>{{ target_amount }} {{ target_currency }} for <0>{{ local_amount }} {{ local_currency }} <1>({{ price_rate }} {{local_currency}}/{{ target_currency }})","1623916605":"I wasn’t able to make full payment.","1654365787":"Unknown","1660278694":"The advertiser changed the rate before you confirmed the order.","1671725772":"If you choose to cancel, the edited details will be lost.","1675716253":"Min limit","1678804253":"Buy {{ currency }}","1685888862":"An internal error occurred","1691540875":"Edit payment method","1703154819":"You're editing an ad to sell <0>{{ target_amount }} {{ target_currency }}...","1721422292":"Show my real name","1734661732":"Your DP2P balance is {{ dp2p_balance }}","1738504192":"E-wallet","1747523625":"Go back","1752096323":"{{field_name}} should not be below Min limit","1767817594":"Buy completion <0>30d","1784151356":"at","1791767028":"Set a fixed rate for your ad.","1794470010":"I’ve made full payment, but the seller hasn’t released the funds.","1794474847":"I've received payment","1798116519":"Available amount","1809099720":"Expand all","1810217569":"Please refresh this page to continue.","1842172737":"You've received {{offered_amount}} {{offered_currency}}","1848044659":"You have no ads.","1859308030":"Give feedback","1874956952":"Hit the button below to add payment methods.","1886623509":"{{ad_type}} {{ account_currency }}","1902229457":"Unable to block advertiser","1908023954":"Sorry, an error occurred while processing your request.","1923443894":"Inactive","1928240840":"Sell {{ currency }}","1929119945":"There are no ads yet","1976156928":"You'll send","1992961867":"Rate (1 {{currency}})","1994023526":"The email address you entered had a mistake or typo (happens to the best of us).","2020104747":"Filter","2029375371":"Payment instructions","2032274854":"Recommended by {{recommended_count}} traders","2039361923":"You're creating an ad to sell...","2040110829":"Increase my limits","2060873863":"Your order {{order_id}} is complete","2063890788":"Cancelled","2091671594":"Status","2096014107":"Apply","2104905634":"No one has recommended this trader yet","2121837513":"Minimum is {{value}} {{currency}}","2142425493":"Ad ID","2142752968":"Please ensure you've received {{amount}} {{local_currency}} in your account and hit Confirm to complete the transaction.","2145292295":"Rate","-1837059346":"Buy / Sell","-1845037007":"Advertiser's page","-494667560":"Orders","-679691613":"My ads","-526636259":"Error 404","-1540251249":"Buy {{ account_currency }}","-1267880283":"{{field_name}} is required","-2019083683":"{{field_name}} can only include letters, numbers, spaces, and any of these symbols: -+.,'#@():;","-222920564":"{{field_name}} has exceeded maximum length","-2093768906":"{{name}} has released your funds.
Would you like to give your feedback?","-857786650":"Check your verification status.","-612892886":"We’ll need you to upload your documents to verify your identity.","-2090325029":"Identity verification is complete.","-1101273282":"Nickname is required","-919203928":"Nickname is too short","-1907100457":"Cannot start, end with, or repeat special characters.","-270502067":"Cannot repeat a character more than 4 times.","-499872405":"You have open orders for this ad. Complete all open orders before deleting this ad.","-2125702445":"Instructions","-1274358564":"Max limit","-1995606668":"Amount","-1965472924":"Fixed rate","-1081775102":"{{field_name}} should not be below Max limit","-885044836":"{{field_name}} should not exceed Max limit","-1921077416":"All ({{list_value}})","-608125128":"Blocked ({{list_value}})","-1764050750":"Payment details","-2021135479":"This field is required.","-2005205076":"{{field_name}} has exceeded maximum length of 200 characters.","-480724783":"You already have an ad with this rate","-1207312691":"Completed","-688728873":"Expired","-1951641340":"Under dispute","-1738697484":"Confirm payment","-1611857550":"Waiting for the seller to confirm","-1452684930":"Buyer's real name","-1597110099":"Receive","-892663026":"Your contact details","-1875343569":"Seller's payment details","-92830427":"Seller's instructions","-1940034707":"Buyer's instructions","-137444201":"Buy","-1306639327":"Payment methods","-904197848":"Limits {{min_order_amount_limit_display}}-{{max_order_amount_limit_display}} {{currency}}","-464361439":"{{- avg_buy_time_in_minutes}} min","-2109576323":"Sell completion <0>30d","-165392069":"Avg. release time <0>30d","-1154208372":"Trade volume <0>30d","-1887970998":"Unblocking wasn't possible as {{name}} is not using Deriv P2P anymore.","-2017825013":"Got it","-1070228546":"Joined {{days_since_joined}}d","-2015102262":"({{number_of_ratings}} rating)","-1412298133":"({{number_of_ratings}} ratings)","-260332243":"{{user_blocked_count}} person has blocked you","-117094654":"{{user_blocked_count}} people have blocked you","-329713179":"Ok","-1689905285":"Unblock","-992568889":"No one to show here","-1298666786":"My counterparties","-1148912768":"If the market rate changes from the rate shown here, we won't be able to process your order.","-55126326":"Seller","-835196958":"Receive payment to","-1218007718":"You may choose up to 3.","-1933432699":"Enter {{transaction_type}} amount","-2021730616":"{{ad_type}}","-490637584":"Limit: {{min}}–{{max}} {{currency}}","-1974067943":"Your bank details","-1285759343":"Search","-1657433201":"There are no matching ads.","-1862812590":"Limits {{ min_order }}–{{ max_order }} {{ currency }}","-375836822":"Buy {{account_currency}}","-1035421133":"Sell {{account_currency}}","-1503997652":"No ads for this currency.","-1048001140":"No results for \"{{value}}\".","-73663931":"Create ad","-141315849":"No ads for this currency at the moment 😞","-471384801":"Sorry, we're unable to increase your limits right now. Please try again in a few minutes.","-231863107":"No","-150224710":"Yes, continue","-1638172550":"To enable this feature you must complete the following:","-559300364":"Your Deriv P2P cashier is blocked","-740038242":"Your rate is","-205277874":"Your ad is not listed on Buy/Sell because its minimum order is higher than your Deriv P2P available balance ({{balance}} {{currency}}).","-971817673":"Your ad isn't visible to others","-1735126907":"This could be because your account balance is insufficient, your ad amount exceeds your daily limit, or both. You can still see your ad on <0>My ads.","-674715853":"Your ad exceeds the daily limit","-1530773708":"Block {{advertiser_name}}?","-2035037071":"Your Deriv P2P balance isn't enough. Please increase your balance before trying again.","-412680608":"Add payment method","-293182503":"Cancel adding this payment method?","-1850127397":"If you choose to cancel, the details you’ve entered will be lost.","-1601971804":"Cancel your edits?","-1571737200":"Don't cancel","-1072444041":"Update ad","-1422779483":"That payment method cannot be deleted","-1088454544":"Get new link","-2124584325":"We've verified your order","-848068683":"Hit the link in the email we sent you to authorise this transaction.","-1238182882":"The link will expire in 10 minutes.","-142727028":"The email is in your spam folder (sometimes things get lost there).","-227512949":"Check your spelling or use a different term.","-1554938377":"Search payment method","-75934135":"Matching ads","-1856204727":"Reset","-1728351486":"Invalid verification link","-392043307":"Do you want to delete this ad?","-854930519":"You will NOT be able to restore it.","-1600783504":"Set a floating rate for your ad.","-2008992756":"Do you want to cancel this order?","-1618084450":"If you cancel this order, you'll be blocked from using Deriv P2P for {{block_duration}} hours.","-2026176944":"Please do not cancel if you have already made payment.","-1989544601":"Cancel this order","-492996224":"Do not cancel","-1447732068":"Payment confirmation","-1485778481":"Have you received payment?","-403938778":"Please confirm only after checking your bank or e-wallet account to make sure you have received payment.","-1875011752":"Yes, I've paid","-1146269362":"I've received {{amount}} {{currency}}","-563116612":"I haven't paid yet","-984140537":"Add","-1220275347":"You may choose up to 3 payment methods for this ad.","-1340125291":"Done","-1889014820":"<0>Don’t see your payment method? <1>Add new.","-1406830100":"Payment method","-1561775203":"Buy {{currency}}","-1527285935":"Sell {{currency}}","-592818187":"Your Deriv P2P balance is {{ dp2p_balance }}","-1654157453":"Fixed rate (1 {{currency}})","-379708059":"Min order","-1459289144":"This information will be visible to everyone.","-207756259":"You may tap and choose up to 3.","-1282343703":"You're creating an ad to buy <0>{{ target_amount }} {{ target_currency }} for <0>{{ local_amount }} {{ local_currency }} <1>({{ price_rate }} {{local_currency}}/{{ target_currency }})","-2139632895":"You're creating an ad to sell <0>{{ target_amount }} {{ target_currency }} for <0>{{ local_amount }} {{ local_currency }} <1>({{ price_rate }} {{local_currency}}/{{ target_currency }})","-40669120":"You're creating an ad to sell <0>{{ target_amount }} {{ target_currency }}...","-514789442":"You're creating an ad to buy...","-1179827369":"Create new ad","-230677679":"{{text}}","-1914431773":"You're editing an ad to buy <0>{{ target_amount }} {{ target_currency }} for <0>{{ local_amount }} {{ local_currency }} <1>({{ price_rate }} {{local_currency}}/{{ target_currency }})","-107996509":"You're editing an ad to buy <0>{{ target_amount }} {{ target_currency }}...","-863580260":"You're editing an ad to buy...","-1396464057":"You're editing an ad to sell...","-372210670":"Rate (1 {{account_currency}})","-1400835517":"{{ad_type}} {{ id }}","-1318334333":"Deactivate","-1667041441":"Rate (1 {{ offered_currency }})","-1886565882":"Your ads with floating rates have been deactivated. Set fixed rates to reactivate them.","-792015701":"Deriv P2P cashier is unavailable in your country.","-1241719539":"When you block someone, you won't see their ads, and they can't see yours. Your ads will be hidden from their search results, too.","-1007339977":"There are no matching name.","-179005984":"Save","-2059312414":"Ad details","-1769584466":"Stats","-808161760":"Deriv P2P balance = deposits that can’t be reversed","-684271315":"OK","-2090878601":"Daily limit","-474123616":"Want to increase your daily limits to <0>{{max_daily_buy}} {{currency}} (buy) and <1>{{max_daily_sell}} {{currency}} (sell)?","-130547447":"Trade volume <0>30d | <1>lifetime","-1792280476":"Choose your payment method","-383030149":"You haven’t added any payment methods yet","-1269362917":"Add new","-146021156":"Delete {{payment_method_name}}?","-1846700504":"Are you sure you want to remove this payment method?","-532709160":"Your nickname","-1117584385":"Seen more than 6 months ago","-1766199849":"Seen {{ duration }} months ago","-591593016":"Seen {{ duration }} day ago","-1586918919":"Seen {{ duration }} hours ago","-664781013":"Seen {{ duration }} minute ago","-1717650468":"Online","-510341549":"I’ve received less than the agreed amount.","-650030360":"I’ve paid more than the agreed amount.","-1192446042":"If your complaint isn't listed here, please contact our Customer Support team.","-573132778":"Complaint","-792338456":"What's your complaint?","-418870584":"Cancel order","-1392383387":"I've paid","-727273667":"Complain","-2016990049":"Sell {{offered_currency}} order","-811190405":"Time","-961632398":"Collapse all","-415476028":"Not rated","-26434257":"You have until {{remaining_review_time}} GMT to rate this transaction.","-768709492":"Your transaction experience","-652933704":"Recommended","-84139378":"Not Recommended","-1983512566":"This conversation is closed.","-1797318839":"In case of a dispute, we will only consider the communication through Deriv P2P chat channel.","-283017497":"Retry","-979459594":"Buy/Sell","-2052184983":"Order ID","-2096350108":"Counterparty","-750202930":"Active orders","-1626659964":"I've received {{amount}} {{currency}}.","-2139303636":"You may have followed a broken link, or the page has moved to a new address.","-1448368765":"Error code: {{error_code}} page not found","-1660552437":"Return to P2P","-237014436":"Recommended by {{recommended_count}} trader","-849068301":"Loading...","-2061807537":"Something’s not right","-1354983065":"Refresh","-2054589794":"You've been temporarily barred from using our services due to multiple cancellation attempts. Try again after {{date_time}} GMT.","-1079963355":"trades","-930400128":"To use Deriv P2P, you need to choose a display name (a nickname) and verify your identity."} +{ + "6794664": "Ads that match your Deriv P2P balance and limit.", + "19789721": "Nobody has blocked you. Yay!", + "24711354": "Total orders <0>30d | <1>lifetime", + "47573834": "Fixed rate (1 {{account_currency}})", + "50672601": "Bought", + "51881712": "You already have an ad with the same exchange rate for this currency pair and order type.

Please set a different rate for your ad.", + "55916349": "All", + "68867477": "Order ID {{ id }}", + "121738739": "Send", + "122280248": "Avg release time <0>30d", + "134205943": "Your ads with fixed rates have been deactivated. Set floating rates to reactivate them.", + "140800401": "Float", + "145959105": "Choose a nickname", + "150156106": "Save changes", + "159757877": "You won't see {{advertiser_name}}'s ads anymore and they won't be able to place orders on your ads.", + "170072126": "Seen {{ duration }} days ago", + "173939998": "Avg. pay time <0>30d", + "197477687": "Edit {{ad_type}} ad", + "203271702": "Try again", + "231473252": "Preferred currency", + "233677840": "of the market rate", + "246815378": "Once set, your nickname cannot be changed.", + "276261353": "Avg pay time <0>30d", + "277542386": "Please use <0>live chat to contact our Customer Support team for help.", + "316725580": "You can no longer rate this transaction.", + "323002325": "Post ad", + "324970564": "Seller's contact details", + "338910048": "You will appear to other users as", + "358133589": "Unblock {{advertiser_name}}?", + "364681129": "Contact details", + "367579676": "Blocked", + "392469164": "You have blocked {{advertiser_name}}.", + "407600801": "Have you paid {{amount}} {{currency}} to {{other_user_name}}?", + "416167062": "You'll receive", + "424668491": "expired", + "439264204": "Please set a different minimum and/or maximum order limit.

The range of your ad should not overlap with any of your active ads.", + "452752527": "Rate (1 {{ currency }})", + "460477293": "Enter message", + "464044457": "Buyer's nickname", + "473688701": "Enter a valid amount", + "476023405": "Didn't receive the email?", + "488150742": "Resend email", + "498500965": "Seller's nickname", + "501523417": "You have no orders.", + "517202770": "Set fixed rate", + "523301614": "Release {{amount}} {{currency}}", + "525380157": "Buy {{offered_currency}} order", + "531912261": "Bank name, account number, beneficiary name", + "554135844": "Edit", + "555447610": "You won't be able to change your buy and sell limits again after this. Do you want to continue?", + "560402954": "User rating", + "565060416": "Exchange rate", + "580715136": "Please register with us!", + "587882987": "Advertisers", + "611376642": "Clear", + "612069973": "Would you recommend this buyer?", + "628581263": "The {{local_currency}} market rate has changed.", + "649549724": "I’ve not received any payment.", + "654193846": "The verification link appears to be invalid. Hit the button below to request for a new one", + "661808069": "Resend email {{remaining_time}}", + "662578726": "Available", + "683273691": "Rate (1 {{ account_currency }})", + "723172934": "Looking to buy or sell USD? You can post your own ad for others to respond.", + "728383001": "I’ve received more than the agreed amount.", + "733311523": "P2P transactions are locked. This feature is not available for payment agents.", + "767789372": "Wait for payment", + "782834680": "Time left", + "783454335": "Yes, remove", + "830703311": "My profile", + "834075131": "Blocked advertisers", + "838024160": "Bank details", + "842911528": "Don’t show this message again.", + "846659545": "Your ad is not listed on <0>Buy/Sell because the amount exceeds your daily limit of {{limit}} {{currency}}.\n <1 /><1 />You can still see your ad on <0>My ads. If you’d like to increase your daily limit, please contact us via <2>live chat.", + "847028402": "Check your email", + "858027714": "Seen {{ duration }} minutes ago", + "873437248": "Instructions (optional)", + "876086855": "Complete the financial assessment form", + "881351325": "Would you recommend this seller?", + "887667868": "Order", + "892431976": "If you cancel your order {{cancellation_limit}} times in {{cancellation_period}} hours, you will be blocked from using Deriv P2P for {{block_duration}} hours.
({{number_of_cancels_remaining}} cancellations remaining)", + "949859957": "Submit", + "954233511": "Sold", + "957529514": "To place an order, add one of the advertiser’s preferred payment methods:", + "957807235": "Blocking wasn't possible as {{name}} is not using Deriv P2P anymore.", + "988380202": "Your instructions", + "1001160515": "Sell", + "1002264993": "Seller's real name", + "1020552673": "You're creating an ad to buy <0>{{ target_amount }} {{ target_currency }}...", + "1030390916": "You already have an ad with this range", + "1035893169": "Delete", + "1052094244": "Max order", + "1056821534": "Are you sure?", + "1057127276": "{{- avg_release_time_in_minutes}} min", + "1065551550": "Set floating rate", + "1080990424": "Confirm", + "1089110190": "You accidentally gave us another email address (usually a work or a personal one instead of the one you meant).", + "1091533736": "Don't risk your funds with cash transactions. Use bank transfers or e-wallets instead.", + "1103731601": "Your ads are paused", + "1106073960": "You've created an ad", + "1106485202": "Available Deriv P2P balance", + "1109217274": "Success!", + "1119887091": "Verification", + "1121630246": "Block", + "1137964885": "Can only contain letters, numbers, and special characters .- _ @.", + "1151608942": "Total amount", + "1157877436": "{{field_name}} should not exceed Amount", + "1161621759": "Choose your nickname", + "1162965175": "Buyer", + "1163072833": "<0>ID verified", + "1191941618": "Enter a value that's within -{{limit}}% to +{{limit}}%", + "1192337383": "Seen {{ duration }} hour ago", + "1202500203": "Pay now", + "1228352589": "Not rated yet", + "1229976478": "You will be able to see {{ advertiser_name }}'s ads. They'll be able to place orders on your ads, too.", + "1236083813": "Your payment details", + "1258285343": "Oops, something went wrong", + "1265751551": "Deriv P2P Balance", + "1286797620": "Active", + "1287051975": "Nickname is too long", + "1300767074": "{{name}} is no longer on Deriv P2P", + "1303016265": "Yes", + "1313218101": "Rate this transaction", + "1314266187": "Joined today", + "1326475003": "Activate", + "1328352136": "Sell {{ account_currency }}", + "1330528524": "Seen {{ duration }} month ago", + "1337027601": "You sold {{offered_amount}} {{offered_currency}}", + "1347322213": "How would you rate this transaction?", + "1347724133": "I have paid {{amount}} {{currency}}.", + "1366244749": "Limits", + "1370999551": "Floating rate", + "1371193412": "Cancel", + "1381949324": "<0>Address verified", + "1398938904": "We can't deliver the email to this address (usually because of firewalls or filtering).", + "1422356389": "No results for \"{{text}}\".", + "1430413419": "Maximum is {{value}} {{currency}}", + "1438103743": "Floating rates are enabled for {{local_currency}}. Ads with fixed rates will be deactivated. Switch to floating rates by {{end_date}}.", + "1448855725": "Add payment methods", + "1452260922": "Too many failed attempts", + "1467483693": "Past orders", + "1474532322": "Sort by", + "1480915523": "Skip", + "1497156292": "No ads for this currency 😞", + "1505293001": "Trade partners", + "1568512719": "Your daily limits have been increased to {{daily_buy_limit}} {{currency}} (buy) and {{daily_sell_limit}} {{currency}} (sell).", + "1583335572": "If the ad doesn't receive an order for {{adverts_archive_period}} days, it will be deactivated.", + "1587250288": "Ad ID {{advert_id}} ", + "1607051458": "Search by nickname", + "1615530713": "Something's not right", + "1620858613": "You're editing an ad to sell <0>{{ target_amount }} {{ target_currency }} for <0>{{ local_amount }} {{ local_currency }} <1>({{ price_rate }} {{local_currency}}/{{ target_currency }})", + "1623916605": "I wasn’t able to make full payment.", + "1654365787": "Unknown", + "1660278694": "The advertiser changed the rate before you confirmed the order.", + "1671725772": "If you choose to cancel, the edited details will be lost.", + "1675716253": "Min limit", + "1678804253": "Buy {{ currency }}", + "1685888862": "An internal error occurred", + "1691540875": "Edit payment method", + "1703154819": "You're editing an ad to sell <0>{{ target_amount }} {{ target_currency }}...", + "1721422292": "Show my real name", + "1734661732": "Your DP2P balance is {{ dp2p_balance }}", + "1738504192": "E-wallet", + "1747523625": "Go back", + "1752096323": "{{field_name}} should not be below Min limit", + "1767817594": "Buy completion <0>30d", + "1784151356": "at", + "1791767028": "Set a fixed rate for your ad.", + "1794470010": "I’ve made full payment, but the seller hasn’t released the funds.", + "1794474847": "I've received payment", + "1798116519": "Available amount", + "1809099720": "Expand all", + "1842172737": "You've received {{offered_amount}} {{offered_currency}}", + "1848044659": "You have no ads.", + "1859308030": "Give feedback", + "1874956952": "Hit the button below to add payment methods.", + "1886623509": "{{ad_type}} {{ account_currency }}", + "1902229457": "Unable to block advertiser", + "1923443894": "Inactive", + "1928240840": "Sell {{ currency }}", + "1929119945": "There are no ads yet", + "1976156928": "You'll send", + "1992961867": "Rate (1 {{currency}})", + "1994023526": "The email address you entered had a mistake or typo (happens to the best of us).", + "2020104747": "Filter", + "2029375371": "Payment instructions", + "2032274854": "Recommended by {{recommended_count}} traders", + "2039361923": "You're creating an ad to sell...", + "2040110829": "Increase my limits", + "2060873863": "Your order {{order_id}} is complete", + "2063890788": "Cancelled", + "2091671594": "Status", + "2096014107": "Apply", + "2104905634": "No one has recommended this trader yet", + "2121837513": "Minimum is {{value}} {{currency}}", + "2142425493": "Ad ID", + "2142752968": "Please ensure you've received {{amount}} {{local_currency}} in your account and hit Confirm to complete the transaction.", + "2145292295": "Rate", + "-1540251249": "Buy {{ account_currency }}", + "-1267880283": "{{field_name}} is required", + "-2019083683": "{{field_name}} can only include letters, numbers, spaces, and any of these symbols: -+.,'#@():;", + "-222920564": "{{field_name}} has exceeded maximum length", + "-2093768906": "{{name}} has released your funds.
Would you like to give your feedback?", + "-857786650": "Check your verification status.", + "-612892886": "We’ll need you to upload your documents to verify your identity.", + "-2090325029": "Identity verification is complete.", + "-1101273282": "Nickname is required", + "-919203928": "Nickname is too short", + "-1907100457": "Cannot start, end with, or repeat special characters.", + "-270502067": "Cannot repeat a character more than 4 times.", + "-499872405": "You have open orders for this ad. Complete all open orders before deleting this ad.", + "-2125702445": "Instructions", + "-1274358564": "Max limit", + "-1995606668": "Amount", + "-1965472924": "Fixed rate", + "-1081775102": "{{field_name}} should not be below Max limit", + "-885044836": "{{field_name}} should not exceed Max limit", + "-1921077416": "All ({{list_value}})", + "-608125128": "Blocked ({{list_value}})", + "-1764050750": "Payment details", + "-2021135479": "This field is required.", + "-2005205076": "{{field_name}} has exceeded maximum length of 200 characters.", + "-480724783": "You already have an ad with this rate", + "-1207312691": "Completed", + "-688728873": "Expired", + "-1951641340": "Under dispute", + "-1738697484": "Confirm payment", + "-1611857550": "Waiting for the seller to confirm", + "-1452684930": "Buyer's real name", + "-1597110099": "Receive", + "-892663026": "Your contact details", + "-1875343569": "Seller's payment details", + "-92830427": "Seller's instructions", + "-1940034707": "Buyer's instructions", + "-137444201": "Buy", + "-1306639327": "Payment methods", + "-904197848": "Limits {{min_order_amount_limit_display}}-{{max_order_amount_limit_display}} {{currency}}", + "-464361439": "{{- avg_buy_time_in_minutes}} min", + "-2109576323": "Sell completion <0>30d", + "-165392069": "Avg. release time <0>30d", + "-1154208372": "Trade volume <0>30d", + "-1887970998": "Unblocking wasn't possible as {{name}} is not using Deriv P2P anymore.", + "-2017825013": "Got it", + "-1845037007": "Advertiser's page", + "-1070228546": "Joined {{days_since_joined}}d", + "-2015102262": "({{number_of_ratings}} rating)", + "-1412298133": "({{number_of_ratings}} ratings)", + "-260332243": "{{user_blocked_count}} person has blocked you", + "-117094654": "{{user_blocked_count}} people have blocked you", + "-329713179": "Ok", + "-1689905285": "Unblock", + "-1837059346": "Buy / Sell", + "-494667560": "Orders", + "-679691613": "My ads", + "-992568889": "No one to show here", + "-1298666786": "My counterparties", + "-1148912768": "If the market rate changes from the rate shown here, we won't be able to process your order.", + "-55126326": "Seller", + "-835196958": "Receive payment to", + "-1218007718": "You may choose up to 3.", + "-1933432699": "Enter {{transaction_type}} amount", + "-2021730616": "{{ad_type}}", + "-490637584": "Limit: {{min}}–{{max}} {{currency}}", + "-1974067943": "Your bank details", + "-1285759343": "Search", + "-1657433201": "There are no matching ads.", + "-1862812590": "Limits {{ min_order }}–{{ max_order }} {{ currency }}", + "-375836822": "Buy {{account_currency}}", + "-1035421133": "Sell {{account_currency}}", + "-1503997652": "No ads for this currency.", + "-1048001140": "No results for \"{{value}}\".", + "-73663931": "Create ad", + "-141315849": "No ads for this currency at the moment 😞", + "-471384801": "Sorry, we're unable to increase your limits right now. Please try again in a few minutes.", + "-231863107": "No", + "-150224710": "Yes, continue", + "-1638172550": "To enable this feature you must complete the following:", + "-559300364": "Your Deriv P2P cashier is blocked", + "-740038242": "Your rate is", + "-205277874": "Your ad is not listed on Buy/Sell because its minimum order is higher than your Deriv P2P available balance ({{balance}} {{currency}}).", + "-971817673": "Your ad isn't visible to others", + "-1735126907": "This could be because your account balance is insufficient, your ad amount exceeds your daily limit, or both. You can still see your ad on <0>My ads.", + "-674715853": "Your ad exceeds the daily limit", + "-1530773708": "Block {{advertiser_name}}?", + "-2035037071": "Your Deriv P2P balance isn't enough. Please increase your balance before trying again.", + "-412680608": "Add payment method", + "-293182503": "Cancel adding this payment method?", + "-1850127397": "If you choose to cancel, the details you’ve entered will be lost.", + "-1601971804": "Cancel your edits?", + "-1571737200": "Don't cancel", + "-1072444041": "Update ad", + "-1422779483": "That payment method cannot be deleted", + "-1088454544": "Get new link", + "-2124584325": "We've verified your order", + "-848068683": "Hit the link in the email we sent you to authorise this transaction.", + "-1238182882": "The link will expire in 10 minutes.", + "-142727028": "The email is in your spam folder (sometimes things get lost there).", + "-227512949": "Check your spelling or use a different term.", + "-1554938377": "Search payment method", + "-75934135": "Matching ads", + "-1856204727": "Reset", + "-1728351486": "Invalid verification link", + "-392043307": "Do you want to delete this ad?", + "-854930519": "You will NOT be able to restore it.", + "-1600783504": "Set a floating rate for your ad.", + "-2008992756": "Do you want to cancel this order?", + "-1618084450": "If you cancel this order, you'll be blocked from using Deriv P2P for {{block_duration}} hours.", + "-2026176944": "Please do not cancel if you have already made payment.", + "-1989544601": "Cancel this order", + "-492996224": "Do not cancel", + "-1447732068": "Payment confirmation", + "-1485778481": "Have you received payment?", + "-403938778": "Please confirm only after checking your bank or e-wallet account to make sure you have received payment.", + "-1875011752": "Yes, I've paid", + "-1146269362": "I've received {{amount}} {{currency}}", + "-563116612": "I haven't paid yet", + "-984140537": "Add", + "-1220275347": "You may choose up to 3 payment methods for this ad.", + "-1340125291": "Done", + "-1889014820": "<0>Don’t see your payment method? <1>Add new.", + "-1406830100": "Payment method", + "-1561775203": "Buy {{currency}}", + "-1527285935": "Sell {{currency}}", + "-592818187": "Your Deriv P2P balance is {{ dp2p_balance }}", + "-1654157453": "Fixed rate (1 {{currency}})", + "-379708059": "Min order", + "-1459289144": "This information will be visible to everyone.", + "-207756259": "You may tap and choose up to 3.", + "-1282343703": "You're creating an ad to buy <0>{{ target_amount }} {{ target_currency }} for <0>{{ local_amount }} {{ local_currency }} <1>({{ price_rate }} {{local_currency}}/{{ target_currency }})", + "-2139632895": "You're creating an ad to sell <0>{{ target_amount }} {{ target_currency }} for <0>{{ local_amount }} {{ local_currency }} <1>({{ price_rate }} {{local_currency}}/{{ target_currency }})", + "-40669120": "You're creating an ad to sell <0>{{ target_amount }} {{ target_currency }}...", + "-514789442": "You're creating an ad to buy...", + "-1179827369": "Create new ad", + "-230677679": "{{text}}", + "-1914431773": "You're editing an ad to buy <0>{{ target_amount }} {{ target_currency }} for <0>{{ local_amount }} {{ local_currency }} <1>({{ price_rate }} {{local_currency}}/{{ target_currency }})", + "-107996509": "You're editing an ad to buy <0>{{ target_amount }} {{ target_currency }}...", + "-863580260": "You're editing an ad to buy...", + "-1396464057": "You're editing an ad to sell...", + "-372210670": "Rate (1 {{account_currency}})", + "-1400835517": "{{ad_type}} {{ id }}", + "-1318334333": "Deactivate", + "-1667041441": "Rate (1 {{ offered_currency }})", + "-1886565882": "Your ads with floating rates have been deactivated. Set fixed rates to reactivate them.", + "-792015701": "Deriv P2P cashier is unavailable in your country.", + "-806152028": "Your ads are running", + "-1241719539": "When you block someone, you won't see their ads, and they can't see yours. Your ads will be hidden from their search results, too.", + "-1007339977": "There are no matching name.", + "-179005984": "Save", + "-2059312414": "Ad details", + "-1769584466": "Stats", + "-808161760": "Deriv P2P balance = deposits that can’t be reversed", + "-684271315": "OK", + "-2090878601": "Daily limit", + "-474123616": "Want to increase your daily limits to <0>{{max_daily_buy}} {{currency}} (buy) and <1>{{max_daily_sell}} {{currency}} (sell)?", + "-130547447": "Trade volume <0>30d | <1>lifetime", + "-1792280476": "Choose your payment method", + "-383030149": "You haven’t added any payment methods yet", + "-1269362917": "Add new", + "-146021156": "Delete {{payment_method_name}}?", + "-1846700504": "Are you sure you want to remove this payment method?", + "-532709160": "Your nickname", + "-1117584385": "Seen more than 6 months ago", + "-1766199849": "Seen {{ duration }} months ago", + "-591593016": "Seen {{ duration }} day ago", + "-1586918919": "Seen {{ duration }} hours ago", + "-664781013": "Seen {{ duration }} minute ago", + "-1717650468": "Online", + "-510341549": "I’ve received less than the agreed amount.", + "-650030360": "I’ve paid more than the agreed amount.", + "-1192446042": "If your complaint isn't listed here, please contact our Customer Support team.", + "-573132778": "Complaint", + "-792338456": "What's your complaint?", + "-418870584": "Cancel order", + "-1392383387": "I've paid", + "-727273667": "Complain", + "-2016990049": "Sell {{offered_currency}} order", + "-811190405": "Time", + "-961632398": "Collapse all", + "-415476028": "Not rated", + "-26434257": "You have until {{remaining_review_time}} GMT to rate this transaction.", + "-768709492": "Your transaction experience", + "-652933704": "Recommended", + "-84139378": "Not Recommended", + "-1983512566": "This conversation is closed.", + "-1797318839": "In case of a dispute, we will only consider the communication through Deriv P2P chat channel.", + "-283017497": "Retry", + "-979459594": "Buy/Sell", + "-2052184983": "Order ID", + "-2096350108": "Counterparty", + "-750202930": "Active orders", + "-1626659964": "I've received {{amount}} {{currency}}.", + "-237014436": "Recommended by {{recommended_count}} trader", + "-2054589794": "You've been temporarily barred from using our services due to multiple cancellation attempts. Try again after {{date_time}} GMT.", + "-1079963355": "trades", + "-930400128": "To use Deriv P2P, you need to choose a display name (a nickname) and verify your identity." +} diff --git a/packages/p2p/src/translations/ar.json b/packages/p2p/src/translations/ar.json index 0ac9f973c32d..5f42670f6a01 100644 --- a/packages/p2p/src/translations/ar.json +++ b/packages/p2p/src/translations/ar.json @@ -402,4 +402,4 @@ "-2054589794": "لقد تم منعك مؤقتًا من استخدام خدماتنا بسبب محاولات الإلغاء المتعددة. حاول مرة أخرى بعد {{date_time}} بتوقيت جرينتش.", "-1079963355": "الصفقات", "-930400128": "لاستخدام Deriv P2P، تحتاج إلى اختيار اسم عرض (اسم مستعار) والتحقق من هويتك." -} +} \ No newline at end of file diff --git a/packages/p2p/src/translations/bn.json b/packages/p2p/src/translations/bn.json index 0b953810a7a9..e8d57a5d9418 100644 --- a/packages/p2p/src/translations/bn.json +++ b/packages/p2p/src/translations/bn.json @@ -402,4 +402,4 @@ "-2054589794": "You've been temporarily barred from using our services due to multiple cancellation attempts. Try again after {{date_time}} GMT.", "-1079963355": "ব্যবসা", "-930400128": "Deriv P2P ব্যবহার করতে, আপনাকে একটি প্রদর্শন নাম (একটি ডাকনাম) নির্বাচন করতে হবে এবং আপনার পরিচয় যাচাই করতে হবে।" -} +} \ No newline at end of file diff --git a/packages/p2p/src/translations/ko.json b/packages/p2p/src/translations/ko.json index 2bcfe5f1b60c..53b50d8b2535 100644 --- a/packages/p2p/src/translations/ko.json +++ b/packages/p2p/src/translations/ko.json @@ -402,4 +402,4 @@ "-2054589794": "여러 번의 취소 시도로 인해 일시적으로 서비스 이용이 금지되었습니다. {{date_time}} GMT 이후에 다시 시도하세요.", "-1079963355": "거래", "-930400128": "Deriv P2P를 사용하려면 표시 이름 (닉네임) 을 선택하고 ID를 확인해야 합니다." -} +} \ No newline at end of file diff --git a/packages/p2p/src/translations/si.json b/packages/p2p/src/translations/si.json index 9d6050fee6c7..06e189de0508 100644 --- a/packages/p2p/src/translations/si.json +++ b/packages/p2p/src/translations/si.json @@ -402,4 +402,4 @@ "-2054589794": "බහු අවලංගු කිරීමේ උත්සාහයන් හේතුවෙන් ඔබට අපගේ සේවාවන් භාවිතා කිරීම තාවකාලිකව තහනම් කර ඇත. {{date_time}} GMT පසු නැවත උත්සාහ කරන්න.", "-1079963355": "වෙළඳාම්", "-930400128": "Deriv P2P භාවිතා කිරීම සඳහා, ඔබට දර්ශන නාමයක් (අන්වර්ථ නාමයක්) තෝරාගෙන ඔබේ අනන්යතාවය තහවුරු කර ගත යුතුය." -} +} \ No newline at end of file diff --git a/packages/p2p/src/translations/th.json b/packages/p2p/src/translations/th.json index 4eb81bae6158..684305513a23 100644 --- a/packages/p2p/src/translations/th.json +++ b/packages/p2p/src/translations/th.json @@ -402,4 +402,4 @@ "-2054589794": "คุณถูกกันไม่ให้ใช้บริการของเราชั่วคราว เนื่องจากมีความพยายามในการยกเลิกหลายครั้ง คุณจะลองอีกครั้งได้หลังจาก {{date_time}} GMT", "-1079963355": "ธุรกรรมซื้อ-ขาย", "-930400128": "ในการใช้ Deriv P2P คุณต้องเลือกชื่อที่ปรากฏให้เห็น (ชื่อเล่น) และยืนยันตัวตนของคุณ" -} +} \ No newline at end of file diff --git a/packages/reports/package.json b/packages/reports/package.json index 5af4b4635368..0ff1f1b59c59 100644 --- a/packages/reports/package.json +++ b/packages/reports/package.json @@ -75,7 +75,7 @@ "webpack-node-externals": "^2.5.2" }, "dependencies": { - "@deriv/api-types": "^1.0.94", + "@deriv/api-types": "^1.0.112", "@deriv/components": "^1.0.0", "@deriv/deriv-api": "^1.0.13", "@deriv/shared": "^1.0.0", diff --git a/packages/shared/package.json b/packages/shared/package.json index be4380a37288..c046a21565d8 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -40,7 +40,7 @@ "typescript": "^4.6.3" }, "dependencies": { - "@deriv/api-types": "^1.0.94", + "@deriv/api-types": "^1.0.112", "@deriv/translations": "^1.0.0", "@types/js-cookie": "^3.0.1", "@types/react-loadable": "^5.5.6", diff --git a/packages/stores/package.json b/packages/stores/package.json index 1966e83ecf5a..5ea435000f63 100644 --- a/packages/stores/package.json +++ b/packages/stores/package.json @@ -12,7 +12,7 @@ "react": "^17.0.2" }, "devDependencies": { - "@deriv/api-types": "^1.0.94", + "@deriv/api-types": "^1.0.112", "@testing-library/react": "^12.0.0", "typescript": "^4.6.3", "react-router": "^5.2.0", diff --git a/packages/stores/src/mockStore.ts b/packages/stores/src/mockStore.ts index 65459093ef05..f52f00c18835 100644 --- a/packages/stores/src/mockStore.ts +++ b/packages/stores/src/mockStore.ts @@ -404,10 +404,6 @@ const mock = (): TStores & { is_mock: boolean } => { active_modal_wallet_id: '', setWalletModalActiveWalletID: jest.fn(), }, - menu: { - attach: jest.fn(), - update: jest.fn(), - }, notifications: { addNotificationMessage: jest.fn(), addNotificationMessageByKey: jest.fn(), diff --git a/packages/stores/src/stores/FeatureFlagsStore.ts b/packages/stores/src/stores/FeatureFlagsStore.ts index d37e6fbbfe54..ca6a85211c28 100644 --- a/packages/stores/src/stores/FeatureFlagsStore.ts +++ b/packages/stores/src/stores/FeatureFlagsStore.ts @@ -1,10 +1,7 @@ import BaseStore from './BaseStore'; const FLAGS = { - foo: false, - bar: false, - baz: false, - // Add your flag here 🚀 + wallet: false, } satisfies Record; export default class FeatureFlagsStore extends BaseStore<{ [k in keyof typeof FLAGS]: boolean }> { diff --git a/packages/stores/types.ts b/packages/stores/types.ts index 55284fa481b9..90da8659a65b 100644 --- a/packages/stores/types.ts +++ b/packages/stores/types.ts @@ -139,15 +139,6 @@ type TTradingPlatformAvailableAccount = { type TAuthenticationStatus = { document_status: string; identity_status: string }; -type TMenuItem = { - icon: JSX.Element; - id: string; - link_to: string | boolean; - login_only: boolean; - onClick: boolean | (() => void); - text: () => string; -}; - type TAddToastProps = { key: string; content: string; @@ -484,11 +475,6 @@ type TContractStore = { getContractById: (id: number) => ProposalOpenContract; }; -type TMenuStore = { - attach: (item: TMenuItem) => void; - update: (menu: TMenuItem, index: number) => void; -}; - type TNotificationStore = { addNotificationMessage: (message: TNotification) => void; addNotificationMessageByKey: (key: string) => void; @@ -576,7 +562,6 @@ type TTradersHubStore = { export type TCoreStores = { client: TClientStore; common: TCommonStore; - menu: TMenuStore; ui: TUiStore; portfolio: TPortfolioStore; contract_trade: TContractStore; diff --git a/packages/trader/package.json b/packages/trader/package.json index 075ea88eba63..dc450268497d 100644 --- a/packages/trader/package.json +++ b/packages/trader/package.json @@ -79,7 +79,7 @@ "webpack-node-externals": "^2.5.2" }, "dependencies": { - "@deriv/api-types": "^1.0.94", + "@deriv/api-types": "^1.0.112", "@deriv/components": "^1.0.0", "@deriv/deriv-api": "^1.0.13", "@deriv/deriv-charts": "1.3.0", diff --git a/packages/translations/src/translations/ar.json b/packages/translations/src/translations/ar.json index b91c7a3cebae..c8b5b372fe75 100644 --- a/packages/translations/src/translations/ar.json +++ b/packages/translations/src/translations/ar.json @@ -571,7 +571,7 @@ "662548260": "الفوركس ومؤشرات الأسهم والسلع والعملات المشفرة", "662578726": "متاح", "662609119": "قم بتنزيل تطبيق MT5", - "665089217": "يرجى تقديم <0>إثبات الهوية الخاص بك لتوثيق حسابك والوصول إلى الكاشير الخاص بك.", + "665089217": "يرجى تقديم <0>إثبات الهوية الخاص بك لمصادقة حسابك والوصول إلى أمين الصندوق الخاص بك.", "665777772": "XLM/دولار أمريكي", "665872465": "في المثال أدناه، يتم تحديد سعر الافتتاح، والذي يتم تعيينه بعد ذلك لمتغير يسمى «op».", "666724936": "يرجى إدخال رقم هوية صالح.", @@ -3890,4 +3890,4 @@ "-1254554534": "يرجى تغيير مدة الرسم البياني لوضع علامة عليها للحصول على تجربة تداول أفضل.", "-1658230823": "تم بيع العقد لـ<0 />.", "-1905867404": "تم إلغاء العقد" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/bn.json b/packages/translations/src/translations/bn.json index 19f9e8aebd4f..3f83522101d5 100644 --- a/packages/translations/src/translations/bn.json +++ b/packages/translations/src/translations/bn.json @@ -3890,4 +3890,4 @@ "-1254554534": "একটি ভাল ট্রেডিং অভিজ্ঞতার জন্য টিক করতে অনুগ্রহ করে চার্টের সময়কাল পরিবর্তন করুন।", "-1658230823": "চুক্তির জন্য বিক্রি হয়েছিল<0 />।", "-1905867404": "চুক্তি বাতিল করা হয়েছে" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/de.json b/packages/translations/src/translations/de.json index 37a9abbc0438..7bddb248ffc6 100644 --- a/packages/translations/src/translations/de.json +++ b/packages/translations/src/translations/de.json @@ -3890,4 +3890,4 @@ "-1254554534": "Bitte ändern Sie die Chartdauer auf ein Häkchen, um ein besseres Handelserlebnis zu erzielen.", "-1658230823": "Der Vertrag wurde verkauft für<0 />.", "-1905867404": "Vertrag gekündigt" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/fr.json b/packages/translations/src/translations/fr.json index b38543afee0b..0648284d82c0 100644 --- a/packages/translations/src/translations/fr.json +++ b/packages/translations/src/translations/fr.json @@ -3890,4 +3890,4 @@ "-1254554534": "Veuillez changer la durée du graphique pour cocher pour une meilleure expérience de trading.", "-1658230823": "Le contrat a été vendu pour <0 />.", "-1905867404": "Contrat annulé" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/id.json b/packages/translations/src/translations/id.json index 330d16cb3204..38b42f33d6f3 100644 --- a/packages/translations/src/translations/id.json +++ b/packages/translations/src/translations/id.json @@ -3890,4 +3890,4 @@ "-1254554534": "Silakan ubah durasi grafik dalam tik untuk memperoleh pengalaman trading yang lebih baik.", "-1658230823": "Kontrak dijual seharga <0 />.", "-1905867404": "Kontrak dibatalkan" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/ko.json b/packages/translations/src/translations/ko.json index fb05fa10467c..868b79e3b6d0 100644 --- a/packages/translations/src/translations/ko.json +++ b/packages/translations/src/translations/ko.json @@ -3890,4 +3890,4 @@ "-1254554534": "더 나은 트레이딩 경험을 위해 차트 기간을 틱으로 변환해 주시기 바랍니다.", "-1658230823": "계약이 <0 />에 판매되었습니다.", "-1905867404": "취소된 계약" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/pl.json b/packages/translations/src/translations/pl.json index ffe82dc0c6c7..4e882b588e07 100644 --- a/packages/translations/src/translations/pl.json +++ b/packages/translations/src/translations/pl.json @@ -3890,4 +3890,4 @@ "-1254554534": "Zmień okres wykresu na tick, aby zapewnić lepsze doświadczenia podczas handlowania.", "-1658230823": "Kontrakt został sprzedany za <0 />.", "-1905867404": "Kontrakt anulowany" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/pt.json b/packages/translations/src/translations/pt.json index ff74fb51ba98..df993417a54b 100644 --- a/packages/translations/src/translations/pt.json +++ b/packages/translations/src/translations/pt.json @@ -3890,4 +3890,4 @@ "-1254554534": "Por favor, altere a duração do gráfico para tick para uma melhor experiência de negociação.", "-1658230823": "O contrato foi vendido por <0 />.", "-1905867404": "Contrato cancelado" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/si.json b/packages/translations/src/translations/si.json index b1a2366ce960..e1dc4d6ed825 100644 --- a/packages/translations/src/translations/si.json +++ b/packages/translations/src/translations/si.json @@ -3890,4 +3890,4 @@ "-1254554534": "වඩා හොඳ වෙළඳ අත්දැකීමක් සඳහා කරුණාකර ප්රස්ථාර කාලසීමාව ටික් කිරීමට වෙනස් කරන්න.", "-1658230823": "කොන්ත්රාත්තුව විකුණා ඇත<0 />.", "-1905867404": "කොන්ත්රාත්තුව අවලංගු කර ඇත" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/tr.json b/packages/translations/src/translations/tr.json index f150645ae790..3010fced21f8 100644 --- a/packages/translations/src/translations/tr.json +++ b/packages/translations/src/translations/tr.json @@ -3890,4 +3890,4 @@ "-1254554534": "Lütfen daha iyi bir alım satım deneyimi amacıyla tik için grafik süresini değiştirin.", "-1658230823": "Sözleşme <0/> için satıldı.", "-1905867404": "Sözleşme iptal edildi" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/zh_cn.json b/packages/translations/src/translations/zh_cn.json index a0b54363c8ca..b2fbfe4ad909 100644 --- a/packages/translations/src/translations/zh_cn.json +++ b/packages/translations/src/translations/zh_cn.json @@ -3890,4 +3890,4 @@ "-1254554534": "请更改图表持续时间以打勾获取更好的交易体验。", "-1658230823": "合约已卖出,价为<0 />。", "-1905867404": "合约已取消" -} +} \ No newline at end of file diff --git a/packages/translations/src/translations/zh_tw.json b/packages/translations/src/translations/zh_tw.json index 98c388d0c066..9974fb1cb8cc 100644 --- a/packages/translations/src/translations/zh_tw.json +++ b/packages/translations/src/translations/zh_tw.json @@ -3890,4 +3890,4 @@ "-1254554534": "請更改圖表持續時間以打鉤獲取更好的交易體驗。", "-1658230823": "合約已賣出<0 />。", "-1905867404": "合約已取消。" -} +} \ No newline at end of file diff --git a/packages/utils/package.json b/packages/utils/package.json index 43ad34669db5..8252755fa814 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "main": "src/index.ts", "dependencies": { - "@deriv/api-types": "^1.0.94", + "@deriv/api-types": "^1.0.112", "lodash.groupby": "^4.6.0", "lodash.pickby": "^4.6.0", "moment": "^2.29.2" diff --git a/types/utils.d.ts b/types/utils.d.ts index 9e7dfd3e1a55..20e842a31490 100644 --- a/types/utils.d.ts +++ b/types/utils.d.ts @@ -42,27 +42,6 @@ declare global { type NoStringIndex = { [K in keyof T as string extends K ? never : K]: T[K] }; - type DeepRequired = T extends Error - ? Required - : T extends Map - ? Map, DeepRequired> - : T extends ReadonlyMap - ? ReadonlyMap, DeepRequired> - : T extends WeakMap - ? WeakMap, DeepRequired> - : T extends Set - ? Set> - : T extends ReadonlySet - ? ReadonlySet> - : T extends WeakSet - ? WeakSet> - : T extends Promise - ? Promise> - : // eslint-disable-next-line - T extends {} - ? { [Key in keyof T]-?: DeepRequired } - : Required; - type Prettify = { [K in keyof T]: T[K]; // eslint-disable-next-line @typescript-eslint/ban-types