Skip to content

Commit

Permalink
george / rm66510 / implement new payment agent design for deposit and…
Browse files Browse the repository at this point in the history
… withdrawal flow (screens), add searchbar (#6113)

* george / add icons to cashier pa-redesign (#5954)

* add payment-method icons, optimize icons in cashier folder with svgo

* add icons

* optimize cashier icons, fix icons

* george / PA list improvements. Deposit flow (#5816)

* add icons, add payment-agent-card

* add props types

* add capitalizeFirstLetter method

* add payment-agent-providers constant

* add shuffle array utility

* add shuffling of payment agent list

* make payment method filter visible, shuffle payment agent list

* fix broken test (payment-agent-store)

* add test for PaymentAgentCard

* add test for PaymentAgentCardDescription

* add tests for PaymentAgentCardDetails

* add tests for heplpers payment agent

* heplers test improvement

* add pa-deposit-withdraw container

* add hasNormalizedPaymentMethods hepler, add test for helper

* code refactoring

* fix tests

* code refactoring

* fix arrow expansion panel size

* add payment-method icons, optimize icons in cashier folder with svgo

* fix css issues, add icons, add disclaimer, fix tests

* fix tests

* fix dropdown width in 320px

* fix tests payment-agent-disclaimer

* fix comments

* add detail shared component

* replace px to rem

* fix detail import, refactoring pa-card css

* add index file for detail compoennt

* change array utils to plain js files

* refactoring details compoent

* refactoring pa-card-deposit-details

* fix tests, refactoring detail component

* add card background in dark mode

* refactor pa-deposit-details component

* return ic-cashier icon

* fix onload flashing of pa list

* css refactoring

* refcator detail component

* fix css border

* refactor pa detail component, add test

* fix padding for deposit/withdraw tabs

* fix naming data-testid

* fix link attributes in pa-detail

* george / pa list improvements - withdrawal flow (#5817)

* add icons, add payment-agent-card

* add props types

* add capitalizeFirstLetter method

* add payment-agent-providers constant

* add shuffle array utility

* add shuffling of payment agent list

* make payment method filter visible, shuffle payment agent list

* fix broken test (payment-agent-store)

* add test for PaymentAgentCard

* add test for PaymentAgentCardDescription

* add tests for PaymentAgentCardDetails

* add tests for heplpers payment agent

* heplers test improvement

* add pa-deposit-withdraw container

* add hasNormalizedPaymentMethods hepler, add test for helper

* code refactoring

* fix tests

* code refactoring

* fix arrow expansion panel size

* add icons, add payment-agent-card

* add props types

* add capitalizeFirstLetter method

* add payment-agent-providers constant

* add shuffle array utility

* add shuffling of payment agent list

* make payment method filter visible, shuffle payment agent list

* fix broken test (payment-agent-store)

* add test for PaymentAgentCard

* add test for PaymentAgentCardDescription

* add tests for PaymentAgentCardDetails

* add tests for heplpers payment agent

* heplers test improvement

* add pa-deposit-withdraw container

* test refactoring

* add hasNormalizedPaymentMethods hepler, add test for helper

* code refactoring

* fix tests

* add payment agent withdraw details

* add withdraw for listed payment agents

* fix text size

* george / fix adding of payment methods for filtering by payment method (#5757)

* fix adding of payment methods for filtering by payment method

* fix resetting filter to default option

* fix default filter option in mobile

* refactored if statement

* fix payment-agent-store tests

* remove unused field

* add unlisted withdrawal

* resolve name import

* css refactoring

* fix payment agent receipt test

* fix tests for payment agent withdraw confirm component

* fix payment agent store tests

* fiex PaymentAgentCardDepositDetails tests

* fix test for Confirm component

* add fixed deposit/withdraw mobile tabs

* add test for payment-agent-withdraw-form

* fic tests for payment agent transfer confirm component

* add side note disclaimer, css refactoring

* fix tests

* css formatting, fix error dialog css

* css refactoring

* test refactoring, add test for payment-agent-withdrawal-details

* add tests for payment-agent-deposit-withdraw-container

* tests refactoring

* add payment-method icons, optimize icons in cashier folder with svgo

* fix pa card scc, icons rendering

* fix: remove empty string banks

* code refactoring

* add test for disclaimer component, fix propstypes

* fix scc confirm, fix tests

* code refactoring, tesst fix

* css refactoring

* fix css pa transfer confirm

* add close icon in form, fix css

* fix account number regex

* add payment-method icons, optimize icons in cashier folder with svgo

* fix css issues, add icons, add disclaimer, fix tests

* fix tests

* fix dropdown width in 320px

* fix tests payment-agent-disclaimer

* fix comments

* add detail shared component

* replace px to rem

* fix detail import, refactoring pa-card css

* add index file for detail compoennt

* change array utils to plain js files

* refactoring details compoent

* refactoring pa-card-deposit-details

* fix tests, refactoring detail component

* add card background in dark mode

* refactor pa-deposit-details component

* return ic-cashier icon

* fix onload flashing of pa list

* css refactoring

* refcator detail component

* fix scroll to top app-contents

* fix css border

* refactor pa detail component, add test

* fix tests

* fix padding for deposit/withdraw tabs

* refactor code

* slpit withdrawal to listed and ulisted

* fix: responsive screen fix for payment-agent-transfer-receipt

* added money icon and border in transfer to client success page

* css fix for buttons in payment-agent-transfer-receipt

* move pa-deposit-details to separate folder

* refactor css pa-card

* fix dark mode prop in pa card

* refactor pa details, pa-deposit-details, refactor icons

* refactor icons

* refactor pa-details css

* fix pa-receipt test

* fix details link attributes, add desc-wrapper

* refactor app-contents useEffect hook

* implemented design change in pa-agent transfer pages as per the new design

* adjusted test cases as per new change in payment-agent-transfer-confirm and confirm spec

* implemented review comments

* implemented review comments reverted unit of border to px from rem in pa transfer receipt scss

* remove redundant test for pa-disclaimer component

* remove pa-details

* conflict fix

* fix icons

* refactor confirm component

* fix tests

* refactor pa-detail css

* refactor disclaimer side note

* fix ending of pa name in pa receipt

* fix tests

* fix css

* fix comments

* fix failed tests

* fix useEffect dependencies

* fix dependency eslint warning

* improve useEffect hook

* rename pa-deposit-withdraw-conainer to pa-container

* style: change confirm submit buttons top margin

* fix(payment agent withdraw): change payment agent account number validation

* style(payment agent withdraw): fix withdrawal hint overlapping in crypto acount

* fix(payment agent withdraw): clear withdrawal amount input field when switching between payment methods

* fix(payment agent withdraw): dispaly unlisted payment agent name

* fix(payment agent withdraw): change explanation for listed and unlisted pa in withdrawal receipt

* style(payment agent withdraw): change margins for header and explanation blocks in receipt

* fix(payment agent withdraw): fix test for pa-withdraw-receipt component

* style(payment agent withdraw): margins for payment agent receipt

* test(payment agent withdraw): fix tests

* refactor: refactor payment agent name, fix tests

* refactor(payment agent withdraw): refactor localize

Co-authored-by: vinu-deriv <vinu@deriv.com>

* george / rm66637 / PA list improvements. Search bar (#5970)

* add search bar component

* add css for pa-list-search

* add pa search box in deposit-withdraw container

* fix comments

* remove setTimeout from casgier search

* add lodash.debounce as a dependency

* add tests (cashier-search-box, pa-store, pa-deposit-withdraw-container)

* style: fix overlapping in search input

* fix: reset payment agent search term when moving between the pages

* test: fix failed test

* style: fix autofill overlapping

* fix: fix proptypes for value, add number type (#6112)

* george / fix conflicts in pa-redesign branch (#6188)

* Suisin/Update validation rules (#6145)

* update letter symbol rules

* new rulels

* Update declarative-validation-rules.js

* Suisin/Renew validation rules (#6147)

* update letter symbol rules

* new rulels

* Updated Rules

* edited rules

* Update rules to accept multiple space

* translations: 📚 sync translations with crowdin (#6158)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* remove personal-details-step-from-financial-svg (#6135)

* TS migration of cashier UI components (#5947)

* added ts related change required for migrating all components (#5760)

* ts-migration-crypto-fiat-converter (#5796)

* Trigger build

* Update package-lock

* ts-migration-cashier-notifications (#5765)

* bahar/funds_protection_component-ts-migration (#5756)

* funds_protection_component-ts-migration

* remove_extra_type_file

* fix_merge_issue

* hamid/migrate-transfer-confirm-to-ts (#5815)

* Migrate TransferConfirm to TS

* Rename component in test file

* Replace Confirm with TransferConfirm in PAs

* Enhance Tests

* ts-migration-page-404 (#5766)

* Vinu/converted percentage-selector component into typescript (#5785)

* converted percentage-selector component into typescript

* changed the name of test_ids in percentage-selector spec file as per new guidlines

* updated with latest upstream branch

* added reactMouse event in props.types.ts

* Vinu/migrated recent-transaction component to typescript (#5791)

* migrated recent-transaction component to typescript

* fixed Rootsore path in recent-transaction

* tsconfig.json change in types path

* ts-migration-verification-email (#5769)

* bahar/Ts migration no balance (#5774)

* ts-migration-no-balance

* fix_merge_issue

* Vinu/migrating cashier-container into ts (#5780)

* migrting cashier-container into ts WIP

* added type in virtual.tsx

* changed test-ids in cashier-container

* updated the branch with latest upstream branch

* fixed Rootsore path in cashier-container

* tsconfig.json change in types path

* Vinu/Ts cashier error dialog (#5820)

* migrated error-dialog to typescript

* removed proptypes from error-dialog

* added appropriate types to message variable in error-dialog

* updated code with latest upstream branch

* fixed type of rootstore in error-dialog

* fixed Rootsore path in error dialog

* added type for ReactElement in props.types.ts cashier

* Vinu/migration of crypto-transaction-history component into typescript (#5834)

* migration of crypto-transaction-history component into typescript

* Trigger Build

* Trigger Build

* fixed Rootstore path in crypto-transactions-history

* added type for crypto-transaction-details

* added ReactMouseEvent in prop.types

* added data-testid's in crypto-transaction-renderer component

* Migrate CashierLocked to TS (#5959)

* Fix security hotspot reported by sonarcloud

Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: Hamid <hamid@re-work.dev>

* limit the number of chunks creating by webpack (#6040)

* limit the number of chunks creating by webpack

* webpack chunk strategy try 2

* webpack optmzn try 3

* add minchunks count as 30

* webpack max chunks set as 10

* chunk strategy maxchunks updated to 10

* webpack strat minsize rule

* webpack strat update try 5

* webpack strat update try6

* Revert "MaryiaF/fix: P/L is not getting updated when a contract is terminated… (#6024)" (#6034)

This reverts commit ba506880a588f34b911c9acf85829975b1c48f57.

* translations: 📚 sync translations with crowdin (#6037)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* p2p/Floating rate feature (#5494)

* Merge branch 'binary-com:master' into floating_rate (#5080)

* Nijil / DBot - Add multipliers (#4172)

* Retrigger vercel deployment

* Init dbot multiplier

* Fix es-lint issues

* Add contract update dialog validations

* logic added to hasAllRequiredBlocks for multipliers

* Fix es-lint errors

* Update stop loss block description and label

* Filter out multipliers in quick-strategy

* Fix incorrect rendering of duration/multiplier blocks on workspace when they're dragged out from toolbox

* Fix typos

* Add missing proptypes and other minor refactors

* Fix minor issues + logic

* Fix: trade option block not changing according to the selected trade type once it is dragged to workspace first and then plugged to the trade parameters block

* Fix: Disable trade option block when plugged inside trade parameters

* Remove connection to next statement in trade_defintion_restartonerror block

* Make multiplier_stop_loss and multiplier_take_profit independant blocks + other UX improvement

Description \n1.Make multiplier_stop_loss and multiplier_take_profit input field shadow blocks.  \n2. Add check such that duplicate multiplier_take_profit and multiplier_stop_loss cannot be added to trade_definition_multiplier block. \n3.Show amount limits in trade_definition_multiplier block.

* Cleanup workspace when switching between multiplier and other trade options

* Remove extensice validation for multiplier_stop_loss block

* Show dialog for multiplier contract on stop button click + minor cleanups

* Update stop multiplier dialog content

* Update stop multiplier dialog content and button actions

* Minor bug fix

* Fix stop multiplier dialog buttons styling

* fix: multiplier contract not bought even after disabling TP/SL block inside multiiplier block

* Disable stray blocks and their optional children recursively

* fix: recover all pending transactions on page refresh or if client left page mid-contract

* Restrict TP/SL blocks to multiplier block + add close button logic for dialog component

* Fix profit not showing when it's zero

* Add condition for restricted blocks to enable/disable stack option in context menu

* Optimised proposal_open_contract call on mount of transaction tab

* fix es-lint error

* Update logic for recovering open contracts

* Fix no-unused-vars error

* Refactor code for readability

* Refactor code for readability

* Add logic to handle action of reset button in toolbar

* Remove condition where it enabled the button in run panel while the contract is still closing

* Fix default-case expected test error

* Add note for multiplier block

* Add condition to disable run panel button when multiplier contract is closing

* Fix issue where connectWithContractUpdate tried to destructure undefined at first render

* Add Learn more help content for multiplier trade option block

* Minor change in toggle-card-dialog.jsx file

* Refractored help-content from bot-skeleton to bot-web-ui package and updated help content for multiplier trade option block

* Fix missing key prop error

* Minor change in fix where connectWithContractUpdate tried to destructure undefined

* Show banner for bot MF Real & VRTC

Co-authored-by: Matin shafiei <70938039+matin-binary@users.noreply.github.com>
Co-authored-by: Salar Hafezi <salar@re-work.dev>
Co-authored-by: Matin shafiei <matin@binary.com>

* Hirad/Cfd reset password modal js to ts (#4706)

* Changed cfd-reset-password-modal container from js to ts

* fix--Auto styling is done on the components

* fix--Separated types from component

* fix--Auto styling is done on the components

* fix--Added a separate type for errors and Changed the type of current_list

* Auto styling is done on the components

* fix--Used Record utility type to improve readability

* fix--Removed redundant imports and duplicate types

* Pulled the latest changes from master

* fix--Replaced ReactElement with ReactNode

* Pulled from master

* Made some changes to pass the tests

* fix--Changed ReactNode to ReactElement to pass the tests

* fix--Shortened one of the types

* Fixed the conflicts

Co-authored-by: Matin shafiei <matin@binary.com>

* Chore: Added NIN option in IDV dropdown for ng clients (#4970)

* fix: payment info issue (#4978)

Co-authored-by: Matin shafiei <matin@binary.com>

* Bala/Cleanup dashboard (#4967)

* refactor: change folder name to appstore

* chore: cleanup dashboard svgs

* refactor: rename to appstore

* remove separate build for dashboard

* refactor: rename to appstore

* cleanup build

* remove appstore assets

* fix: api-types auto generation

* chore: cleanup dashboard

* chore: cleanup appstore build

* chore: fix appstore main file path

* chore: use consistent configs

* chore: refactor store usage to be consistent

* chore: cleanup dist and routes

* chore: remove old routes config

* cleanup routes config

* setup trading-hub path

* cleanup asset_path

* cleanup redirects

* fix ts lint issues

* fix lint issues

* fix lint issue

* fix test issues

* update tsconfig path

* update codeowners

* chore: added a space

* Update README.md

Co-authored-by: Matin shafiei <matin@binary.com>

* Maryia/TrackJS_Avoiding_Pushwoosh_Failed_to_fetch_error (#4894)

* Maryia/Checking network status before initializing Pushwoosh

* Maryia/refactoring

Co-authored-by: Matin shafiei <matin@binary.com>

* translations: 📚 sync translations with crowdin (#4987)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* salar / Hotfix/multiplier eu (#4989)

* Add helper function for EU countries

* Show digital options banner to VRTC-only EU clients

* Add comment to remove duplicate code

* Fix: apply more compliance conditions

* Fix issue for EU residence

* Apply prettier

* Fix mobx issue for residence

* Fix: prevent calls on undefined

* Fix: check for blockly div first

* Apply prettier

* export_components_which_needed_to_be_used_in_app_store (#4972)

* refactor_payment_agent_component_for_app_store (#4968)

* translations: 📚 sync translations with crowdin (#5005)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* refactor: investor password (#4992)

* Nuri/Refactor: Refactor compare account (#4969)

* refactor compare account

* retrigger circleci

* retrigger deployment

* removed unused text

* likhith/OrderConfirmCompleted error status displayed on slow n/w (#4832)

* Resolved: #56123 - OrderConfirmCompleted error status displayed on slow n/w

* Refactored code

* Fixed lint errors

* implemented review comment

* Resolved eslint issues

* Resolved Console.log error

* Added comments to changes

* Resolved lint errors

* Removed unwanted component

* fix storybook build (#4997)

* MaryiaF/fix: TrackJS error - i.resetVirtualBalance is not a function (#4892)

* MaryiaF/fix: TrackJS error - i.resetVirtualBalance is not a function

* MaryiaF/fix: TrackJS error - i.resetVirtualBalance is not a function

* Maryia/Fix for styles of POI & POA steps in Settings and CFD modals (#4761)

* Maryia/fixed styles of poa upload block

* Maryia/fixed cfd poa modal for responsive mode

* Maryia/fix for POI step style in CFD modal

* Maryia/fixed style of upload criteria in CFD modal POA step

* Maryia/refactoring as per deriv app code standard

* Maryia/replaced px with rem

* Maryia/fix for the upload box style requiring nesting inside list

* Maryia/fixed POI styles

* Hirad/Cfd dashboard container JS to TS (#4941)

* Changed cfd-dashboard container from javascript to typescript

* fix--Fixed the default export of the cfd-dashboard

* Pulled from master

* fix--Invisible tab menu should be fixed

* Auto styling is done

* IDV notification changes and refactoring (#5001)

* Akmal / Add trustpilot notification (#4974)

* Add trustpilot notification

* Fix formatting

* Add undefined check

* Vijayasree/Manage Account modal from Cashier Onboarding links are broken on iphoneSE (#4948)

* Manage Account modal from Cashier Onboarding links are broken on iphone SE

* Manage Account modal from Cashier Onboarding links are broken on iphone SE

* Manage Account modal from Cashier Onboarding links are broken on iphoneSE

* Update account-wizard.scss

Co-authored-by: Matin shafiei <matin@binary.com>

* likhith/Added jest config and test cases for App-Content component (#4876)

* Added jest config and test cases for App-Content component

* Added test cases for App Content component

* Fixed lint errors

* Removed lint errors and configured webpack

* Reordered webpack extension array

* Implemented review comments

* implemented review comments

* george / added test for "PaymentAgentList" component (#4825)

* added test for "PaymentAgentList" component

* fixed a spelling error

* refactored code, changed query method

* code refactoring

* george / added tests for OnRampProviderCard (#4880)

* added tests for OnRampProviderCard

* code refactoring (add data-testid into Icon component)

* naming refactoring data-testid

* naming refactoring

* add new prop (data_testid) to Icon component

* code refactoring using icon prop data_testid

* add prop types for data_testid

* likhith/Removed unused functions from Cashier container and added test cases (#4821)

* likhith/added testcases to cashier-container

* added loader check test case

* Variable change

* Fixed variable scoping

* Refactored code inline with  naming conventions

* Removed code smells

* Improved code visibility

* Removed unused functionality in CashierComponent

* Removed unused imports

* Removed unused property and improved test cases

* modified input data

* Incorporated review comments

* Incorporated review comments

* Added test cases to order and order-table (#4916)

* fix test cases because of refactoring the component (#5029)

* Nijil/Pass correct value to SelectNative value prop from PA dropdown (#5034)

* fix: pass correct value to SelectNative value prop

* minor refactor

* translations: 📚 sync translations with crowdin (#5039)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* MaryiaF/fix: bold the menu option when the user has gone by the child… (#4965)

* MaryiaF/fix: bold the menu option when the user has gone by the child menu items and then navigated one of them to the corresponding page

* MaryiaF/refactor:  solution with switching to the bold menu item

* MaryiaF/chore: revert intent

* MaryiaF/refactor: use Text component instead of spane in toggle-menu-drawer file

* MaryiaF/refactor: remove unuseful  style and change import

* Merge branch 'master' of github.com:binary-com/deriv-app into 57685_2

* MaryiaF/fix: all the sub menus are not supposed to be in bold in first visit, 1 of the sub menu should be bold during the visit

* MaryiaF/fix: condition when the menu item should be bold

* MaryiaF/fix: remove console.log

* Revert "Merge branch 'master' of github.com:binary-com/deriv-app into 57685_2"

This reverts commit 2c19bed858d09d2dee7b4ffb939f80617a91972e.

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* <SearchBox /> test coverage (#4900)

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Artsem / <Verification /> test coverage (#4890)

* <Verification /> test coverage

* remove redundant import

* fix testid naming

* fix testid and elements naming

* remove redundant mockProps()

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Amina/test_coverage_for_poi-verified_component_in_account_package (#5006)

* poi-verified-spec

* poi-verified-spec

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Amina/test_coverage_for_poa_unverified_component_in_account_package (#4993)

* unverified-spec

* poa-unverified

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* Amina/test coverage for poa-submitted (#4990)

* test_coverage_for_poa_submitted

* fix

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* george / test coverage for "recent transaction" component (#4838)

* added tests for RecentTransaction component

* fixed condition for cashier transaction icon

* removed code duplication

* refactored code

* code refactoring (add data-testid into Item component)

* code refactoring

* naming refactoring data-testid

* naming refactoring

* add new prop (data_testid) to Icon component

* code refactoring using icon prop data_testid

* add prop types for data_testid

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>

* translations: 📚 sync translations with crowdin (#5048)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* update branch with master (#5010)

* Maryia/Set notifications together with each handling of notifications (#4958)

* Maryia/Set notifications before each handling of notifications

* Maryia/style fix to fit in long FR, ES & PT text on the notification button

* Fix design for DMT5 investor password reset modal (#4942)

* Ako/ Codecov integration (#5053)

* build/ add test:ci script to run tests in the ci with different config

* ci/ add codecov github action

* ci/ workflow update

* ci/ update coverage path

* ci/ get coverage over all of the files

* ci/ get coverage on pull request

* Revert "build/ add test:ci script to run tests in the ci with different config"

This reverts commit 2771958602f5af3048c334e28868d05f9ff4f6cd.

* doc/ add codecov badge to readme file

* Vijayasree/Crypto icon in withdrawal page is not shown for specific device IOS (#4976)

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* re-trigger build

* re-trigger build

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Crypto icon in withdrawal page is not shown for specific device IOS

* Sara / Fixed issue with error handling (#4966)

* Fixed issue with error handling

* Removed extra code

* fixed issue with aggregation methods

* MaryiaF/chore: remove consoles (#5059)

* Matin/Add: TS files for translation extraction (#5073)

* remove appstore package from translations (#5075)

Co-authored-by: Matin shafiei <70938039+matin-binary@users.noreply.github.com>
Co-authored-by: Salar Hafezi <salar@re-work.dev>
Co-authored-by: Matin shafiei <matin@binary.com>
Co-authored-by: hirad-rewok <91878582+hirad-rewok@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Maryia <87321516+maryia-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: Salar Hafezi <76559464+salarhfz-fs@users.noreply.github.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: njazuli-deriv <78890281+njazuli-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Maryia Frantsava <88426229+maryiafrantsava-deriv@users.noreply.github.com>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: vijayasree-deriv <98810931+vijayasree-deriv@users.noreply.github.com>
Co-authored-by: george-usynin-deriv <89790856+george-usynin-deriv@users.noreply.github.com>
Co-authored-by: Artsem Kavaleu <88381164+artsemkavaleu-deriv@users.noreply.github.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: Niloofar Sadeghi <93518187+niloo-fs@users.noreply.github.com>
Co-authored-by: mitra-fs <64970259+mitra-fs@users.noreply.github.com>
Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@firstsource.tech>
Co-authored-by: sara-fs <55442058+sara-fs@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@deriv.com>

* Revert "Merge branch 'binary-com:master' into floating_rate (#5080)" (#5081)

This reverts commit 725636b267eb434a278976b67c3461ccc2130338.

* Artsem / Floating rate banner and warning for existing ads (#4975)

* Add floating rate enable banner and warning icon

* remove extra function call

* remove deprecated conditions

* remove conditional render, add todo comment

* fix Localize settings

* likhith/Created Floating rate custom component (#4971)

* Created Floating rate custom component

* Removed hardcoded values

* Incorporated review comments

* Reordered functions as per style guide

* Replaced Css units

* Incorporated review comments

* Empty commit

* Minor bug fix

* Renamed functions appropriately

* Incorporated review comments

* Fetching floating rate status from const

* Resolved lint errors

* Incorporated review comments

* incoeporated review comments

* Added syles as per UX

* Added a comment to explian props

* Changed CSS as per BEM standard

* Changes naming conventions

* Implemented review comments

* Refactored code as per comments

* Fixed eslint errors

* Reverted the changes made

* Minor bug fixes

* Added currecnt_focus prop

* likhith/create floating-rate ad (#4964)

* Floating-rate Ui created

* Added validations to floating-rate component

* Implemented Floating rate component

* Added default values for floating rates based on ad type

* fixed lint issues

* Minor bug fixes

* Added store subscriptions

* Enhanced InputField component and added floating rate store

* Resolved lint errors

* Added changes for My Ad screen

* Added floate-rate

* Added exisiting user update

* Added reaction to my-ad store

* Edit form

* Added edit ad section

* Added switch rate modal

* Added switch ad dialog

* Added banner condition

* Added banner condition

* Empty commit

* Minor bug fixes

* Minor bug fixes

* removed console logs

* Incorporated API changes

* Incorporated review comments

* Removed duplication

* Integrated API with create floting rate ad

* Incorporated review comments

* Added floating rate error messages

* Resolved lint error

* Added styling as per UX

* Minor bug fix in create ad form

* Changes CSS as per BEM

* Resolved lint error

* Added current_focus to input field

* Minor bug fixes for Create ad

* Incorporated review comments

* Minor bug fix

* Removed empty structure

* Removed additional switch state

* Fixed issue with date banner

* Added test cases for Floating rate component

* Removed the empty element and replaced with null

* Incorporated the changes

* fixed incorrect file name

* Trigger Build

* Added as per naming

* Removed localize of 1

* Added review comments

* Incorporated changes

* Replaced string with constant

* Incorporated review comments

* Removed un-necessary div

* Removed css

* Renamed function

* Minor bug fixes and incorporated comments

* Added fallback

* alphabetize observables

* Replaced CSS for Ad status

* Resoled CSS and functionality bugs

* Fixed lint errors

* Resolved lint erros

* Incorporated review comments

* Reduced spacing between the banner

* Formatted user input

* Fixed failing test case

* Added comments to explain functionality

* Fetching date and time from server

* Renamed function

* Refactored code

* Added review comments

* Resolved decimal round off issue

* Fixed Rounding off of decimal digits

* Regex change in psoitive integer check

* Resolved issue with round off to decimal point

* Re-arranged imports

* Fixed the testcase

* Fixed floating_rate input check

* Removed Math.sign

* Reverted decimal change

* Implemented round of logic for decimal places

* refactor: Renamed variables

* fix: Round off issue in Create Ad summary

* fix: resolved decimal point to 2 digits

* Resolved lint errors

* fix: Renamed the function

* chore: Ad display table rate will be calculated from

* fix: test color in dark theme

* fix: label changes b/w fixed and floating

* fix: invoking api call to fetch the changes

* fix: rate synced b/w myads and buy/sell

* fix: range offset validation

* fix: modified rate property in edit ads

* fix: Float rate input suffix

* fix: code formatted

* fix: setting floating rate to 2 decimals on blur

* fix: spacing issue with floating rate input

* Trigger build

* Trigger build

* fix: removed unwanted padding

* fix: added ellipse to fix over lapping

* fix: removed disabling of floating rate field buttons

* fix: resolved issue with error message

* fix: Overlapping CSS issues in Mobile

* fix: added missing background color for dark theme

* fix: removed button highlight in mobile

* fix: button higlight issue

* fix: display of cursor pointer on scroll

* fix: resolved issue with message

* fix: Ad change warning message

* fix: color for dark mode

Co-authored-by: Likhith Kolayari <likhith@deriv.com>

* fix: conflict message not updated

* likhith/created edit my ad screen (#4988)

* Floating-rate Ui created

* Added validations to floating-rate component

* Implemented Floating rate component

* Added default values for floating rates based on ad type

* fixed lint issues

* Minor bug fixes

* Added store subscriptions

* Enhanced InputField component and added floating rate store

* Resolved lint errors

* Added changes for My Ad screen

* Added floate-rate

* Added exisiting user update

* Added reaction to my-ad store

* Edit form

* Added edit ad section

* Added switch rate modal

* Added switch ad dialog

* Added banner condition

* Added banner condition

* Empty commit

* Implemented edit ads for floating rates

* Inorporated review comment

* minor bug fixes

* Minor bug fixes

* Minor bug fixes

* removed console logs

* Added rae_type prop

* Incorporated API changes

* Incorporated API changes

* Incorporated review comments

* Removed duplication

* Integrated API with create floting rate ad

* Incorporated review comments

* Added floating rate error messages

* Resolved lint error

* Added styling as per UX

* Added styles as per UX

* Refactoring code

* Css changes to summary component

* Trigger Build

* Minor bug fix in Create Ad form

* Minor bug fix in create ad form

* Changes CSS as per BEM

* Resolved lint error

* Added current_focus to input field

* Minor bug fixes for Create ad

* Incorporated review comments

* Minor bug fix

* Removed empty structure

* Removed additional switch state

* Fixed issue with date banner

* Added test cases for Floating rate component

* Removed the empty element and replaced with null

* Incorporated the changes

* fixed incorrect file name

* Trigger Build

* Added as per naming

* Removed localize of 1

* Added review comments

* Incorporated changes

* Replaced string with constant

* Incorporated review comments

* Removed un-necessary div

* Removed css

* Renamed function

* Minor bug fixes and incorporated comments

* Added fallback

* alphabetize observables

* Replaced CSS for Ad status

* Migrated create ad comments to Edit ad

* Resolved lint errors

* Fixed lint issues

* Resoled CSS and functionality bugs

* Fixed lint errors

* Resolved lint erros

* Incorporated review comments

* Reduced spacing between the banner

* Formatted user input

* Fixed failing test case

* Added comments to explain functionality

* Fetching date and time from server

* Renamed function

* Refactored code

* Added review comments

* Resolved decimal round off issue

* Fixed Rounding off of decimal digits

* Added test case for create ad

* Regex change in psoitive integer check

* Added test case to test form values

* Resolved decimal round off issue

* Added test acss to edit form

* Resolved lint errors

* Resolved issue with round off to decimal point

* Re-arranged imports

* Fixed the testcase

* Removed unused imports

* Fixed floating_rate input check

* Removed Math.sign

* Reverted decimal change

* Implemented round of logic for decimal places

* refactor: Renamed variables

* refactor: Added fallback condition

* fix: added a exchange rate fallback condition

* fix: Round off issue in Create Ad summary

* fix: resolved decimal point to 2 digits

* Resolved lint errors

* fix: Renamed the function

* chore: Ad display table rate will be calculated from

* fix: test color in dark theme

* fix: label changes b/w fixed and floating

* fix: invoking api call to fetch the changes

* fix: rate synced b/w myads and buy/sell

* fix: range offset validation

* fix: modified rate property in edit ads

* fix: Float rate input suffix

* fix: code formatted

* fix: setting floating rate to 2 decimals on blur

* fix: spacing issue with floating rate input

* Trigger build

* Trigger build

* fix: removed unwanted padding

* fix: added ellipse to fix over lapping

* incorporated changes

* fix: removed disabling of floating rate field buttons

* fix: resolved issue with error message

* fix: Overlapping CSS issues in Mobile

* fix: added missing background color for dark theme

* fix: removed button highlight in mobile

* fix: button higlight issue

* fix: display of cursor pointer on scroll

* fix: resolved issue with message

* fix: modified display of summary in edit ad component

* fix: removed spec code

* fix: Removed test cases

* chore: reverted old commit

* feat: Added banner for switch rate

* fix: Error message text

* fix: incorporated review comments

* fix: removed unwanted store condition and added subscription to exchange rates

* fix: removed incorrect function call

* fix: added a null check

* fix: refactored code

* ref: Added comments

* ref: Refactored code for performance

* ref: refactored code

* ref: code refactor

* ref: Incorporated review comments

* Trigger Build

* fix: removed fixed size

* fix: resolved conflict

* fix: moved functionality from component to store

* fix: removed unnecessary commenting

* ref: renamed cancel action functions

* ref: refactored code for increated readability

* feat: implemented a function for removing trailing zeros

* ref: refactored the code in edit ad summary

* fix: reverted decimal round off rules

* fix: resolved issue with resetting selected Ad id

* fix: switching ad types in edit

* fix: issue with edit ad switch

* fix: display rate change dialog even when ads are deactivated

* fix: disabled activate ad when past date is passed

* fix: displaying error message based on the required ad type

* fix: banner glitch occurs when data loaded in chunks

* fix: enable ads after switch update

* fix: Form should not be checked for value change when ad switch is triggered

* fix: test to incorporate sign

* fix: implemented dynamic type for field in mobile

* fix: added css to fix disable styling

* fix: enforcing disable bg color for popover

* fix: responsive view of switch ad modal

* fix: added missing theme color for dark mode

* fix: banner width consistancy

* fix: incorporated touched state for Payment method

Co-authored-by: Likhith Kolayari <likhith@deriv.com>

* likhith/Feature  buy sell confirmation (#5487)

* Floating-rate Ui created

* Added validations to floating-rate component

* Implemented Floating rate component

* Added default values for floating rates based on ad type

* fixed lint issues

* Minor bug fixes

* Added store subscriptions

* Enhanced InputField component and added floating rate store

* Resolved lint errors

* Added changes for My Ad screen

* Added floate-rate

* Added exisiting user update

* Added reaction to my-ad store

* Edit form

* Added edit ad section

* Added switch rate modal

* Added switch ad dialog

* Added banner condition

* Added banner condition

* Empty commit

* Minor bug fixes

* Minor bug fixes

* removed console logs

* Incorporated API changes

* Incorporated review comments

* Removed duplication

* Integrated API with create floting rate ad

* Incorporated review comments

* Added floating rate error messages

* Resolved lint error

* Added styling as per UX

* Minor bug fix in create ad form

* Changes CSS as per BEM

* Resolved lint error

* Added current_focus to input field

* Minor bug fixes for Create ad

* Incorporated review comments

* Minor bug fix

* Removed empty structure

* Removed additional switch state

* Fixed issue with date banner

* Added test cases for Floating rate component

* Removed the empty element and replaced with null

* Incorporated the changes

* fixed incorrect file name

* Trigger Build

* Added as per naming

* Removed localize of 1

* Added review comments

* Incorporated changes

* Replaced string with constant

* Incorporated review comments

* Removed un-necessary div

* Removed css

* Renamed function

* Minor bug fixes and incorporated comments

* Added fallback

* alphabetize observables

* Replaced CSS for Ad status

* Resoled CSS and functionality bugs

* Fixed lint errors

* Resolved lint erros

* Incorporated review comments

* Reduced spacing between the banner

* Formatted user input

* Fixed failing test case

* Added comments to explain functionality

* Fetching date and time from server

* Renamed function

* Refactored code

* Added review comments

* Resolved decimal round off issue

* Fixed Rounding off of decimal digits

* Regex change in psoitive integer check

* Resolved issue with round off to decimal point

* Re-arranged imports

* Fixed the testcase

* Fixed floating_rate input check

* Removed Math.sign

* Reverted decimal change

* Implemented round of logic for decimal places

* refactor: Renamed variables

* fix: Round off issue in Create Ad summary

* fix: resolved decimal point to 2 digits

* Resolved lint errors

* fix: Renamed the function

* chore: Ad display table rate will be calculated from

* fix: test color in dark theme

* fix: label changes b/w fixed and floating

* fix: invoking api call to fetch the changes

* fix: rate synced b/w myads and buy/sell

* fix: range offset validation

* fix: modified rate property in edit ads

* fix: Float rate input suffix

* fix: code formatted

* fix: setting floating rate to 2 decimals on blur

* fix: spacing issue with floating rate input

* Trigger build

* Trigger build

* fix: removed unwanted padding

* fix: added ellipse to fix over lapping

* fix: removed disabling of floating rate field buttons

* fix: resolved issue with error message

* feat: Implemented floating rate for buy/sell

* fix: Overlapping CSS issues in Mobile

* fix: added missing background color for dark theme

* fix: removed button highlight in mobile

* fix: button higlight issue

* fix: display of cursor pointer on scroll

* fix: resolved issue with message

* fix: color for dark mode

* fix: buy/sell modal styling

* fix: render data in accordian

* feat: incorporated expand all accordian

* feat: Implemented Expand & Collapse all feature

* ref: code refactor

* fix: removed console errors

* fix: removed unused prop

* fix: incorporated review comments

* fix: incorporated review comments

* fix: incorporated Expamd all button

* fix: incorrect prop name in accordion component

* fix: incorporated review comments

* ref: Removed code duplication

* ref: refactored the code

* fix: changes px to rem

* fix: incorporated rate change error dialog

* fix: removed unwanted CSS

* fix: renamed porptype in Rate Change modal

* ref: code refactored

* ref:  rate change modal code refactored

* ref: Refactored code

* fix: css issues related to buy-sell dialog

* fix: fixed failing test cases

* fix: Added a error code check to display appropriate popups

* fix: CSS inssues in Buy-sell modal

* fix: css issue of error hintbox

* fix: resolved issue with rounding digit in receive amount

* fix: blocking order creation when balance is low

* fix: css changes to fix disabling form

* fix: modal condition to display low balance

* fix: blocking user from entering value more than balance

* fix: display Form error messages in footer and account balance error in banner

* fix: resolved lint errors

* ref: changed the TODO comment

* ref: fixed the comment

* fix: incorporated subscribeWS method

* fix: resolved failing testcase issue

* fix: removed commented code

* fix: display of incorrect efective rate

* fix: decimal round off

* fix: navigation to buy/sell table when try again is clicked

* fix: buy/sell order dialog title to match the design

* fix: css issues in buy/sell

* fix: design mismatch in order confiormation dialog

* ref: Refactored code to reuse functionality

* fix: removed commented code

* fix: market change update in Advertiser section

* fix: re-render on balance change

* fix: disabling fields when balance is low

* fix: expand/collapse issue

* fix: resolved issue with expand and collapse

* fix: restricted rate input to 8 characters

* fix: resolved console error

* fix: file name

* fix: fixed failing test case

* fix: added order input check against account balance

* fix: css issues in add payment method in buy-sell form

* fix: validation of sell order

* fix: currency format of balance

* fix: re-establish n/w connection on reload

* ref: Incorporated safety null check

* fix: moved low balance banner display to be handled by state

Co-authored-by: Likhith Kolayari <likhith@deriv.com>

* farrah/ removed payment method banner in p2p (#5755)

* removed transaction time and payment method banners

* removed setting of missing payment methods

* reverted removal of reduced transaction time banner

* likhith/incorporated market rate calculation with 6 decimals (#5770)

* feat: incorporated market rate calculation with 6 decimals

* ref: refactored code to generate effective rate

* ref: removed commented code

* fix: round off decimal calculation of effective market rate

* fix: formatting decimals in effective rate

* fix: set the form to be dirty when PM is selected

* fix: checking for change when PM methods are modified

* fix: enable button for edit ad

* fix: enabling submit method for buy ads

* fix: decimal round off issue in buy-sell

* fix: display min of 2 decimal points

* fix: displying initial value of buy-sell ad

* Trigger build

* fix: removed unnecessary spacing

* Trigger build

* fix: effective rate round off in Buy/sell

* Trigger build

* fix: setting correct ad type

* fix: display order rate amount

* fix: removed formatted text usage

* fix: removed incorrect round off

* fix: sunc effective_rate calculation b/w FE & BE (#5910)

* fixed order table row spacing (#5900)

* fixed post ad button (#5912)

* farrah/ update received amount if rate has changed (#5911)

* fixed received amount when rate has changed

* refactor code

* formatted received amount (#5913)

* farrah/ fixed input amount validation on buy/sell form (#5928)

* fixed input amount validation

* refactor code

* disabled edit button for temporary banned users (#5926)

* Remove duplicate setRemount entry

* farrah/ fixed overlapping status in order page (#5950)

* fixed overlapping status in order page

* refactor code

* farrah/ fixed buy and sell form spacing (#5899)

* fixed buy and sell form spacing

* fixed banner spacing

* fixed banner spacing in mobile

* fixed spacing on responsive

Co-authored-by: Matin shafiei <70938039+matin-binary@users.noreply.github.com>
Co-authored-by: Salar Hafezi <salar@re-work.dev>
Co-authored-by: Matin shafiei <matin@binary.com>
Co-authored-by: hirad-rewok <91878582+hirad-rewok@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Maryia <87321516+maryia-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: Salar Hafezi <76559464+salarhfz-fs@users.noreply.github.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: njazuli-deriv <78890281+njazuli-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Maryia Frantsava <88426229+maryiafrantsava-deriv@users.noreply.github.com>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: vijayasree-deriv <98810931+vijayasree-deriv@users.noreply.github.com>
Co-authored-by: george-usynin-deriv <89790856+george-usynin-deriv@users.noreply.github.com>
Co-authored-by: Artsem Kavaleu <88381164+artsemkavaleu-deriv@users.noreply.github.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: Niloofar Sadeghi <93518187+niloo-fs@users.noreply.github.com>
Co-authored-by: mitra-fs <64970259+mitra-fs@users.noreply.github.com>
Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@firstsource.tech>
Co-authored-by: sara-fs <55442058+sara-fs@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>

* translations: 📚 sync translations with crowdin (#6041)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* add minchunks count as 30

* webpack max chunks set as 10

* chunk strategy maxchunks updated to 10

* fixed exchange rate subscription error (#6046)

* reverted commit

* webpack start try7

* farrah/ fixed sell form validation (#6047)

* fixed sell form validation

* fixed buy/sell form validations

* reset amount with empty field

* maxchunks to 25

* webpack strategy update

* webpack strategy update minSizeReduction

* webpack chunk strategy optimization

* re arrange and update configs

Co-authored-by: ashrafali-v <ashrafalifrk@gmail.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: Nijil Nirmal <62882794+nijil-binary@users.noreply.github.com>
Co-authored-by: Matin shafiei <70938039+matin-binary@users.noreply.github.com>
Co-authored-by: Salar Hafezi <salar@re-work.dev>
Co-authored-by: Matin shafiei <matin@binary.com>
Co-authored-by: hirad-rewok <91878582+hirad-rewok@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Maryia <87321516+maryia-deriv@users.noreply.github.com>
Co-authored-by: Salar Hafezi <76559464+salarhfz-fs@users.noreply.github.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: njazuli-deriv <78890281+njazuli-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Maryia Frantsava <88426229+maryiafrantsava-deriv@users.noreply.github.com>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: vijayasree-deriv <98810931+vijayasree-deriv@users.noreply.github.com>
Co-authored-by: george-usynin-deriv <89790856+george-usynin-deriv@users.noreply.github.com>
Co-authored-by: Artsem Kavaleu <88381164+artsemkavaleu-deriv@users.noreply.github.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: Niloofar Sadeghi <93518187+niloo-fs@users.noreply.github.com>
Co-authored-by: mitra-fs <64970259+mitra-fs@users.noreply.github.com>
Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@firstsource.tech>
Co-authored-by: sara-fs <55442058+sara-fs@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: Likhith Kolayari <likhith@deriv.com>

* MaryiaF/refactor: convert summary-card to ts (#6001)

* MaryiaF/refactor: convert summary-card to ts

* MaryiaF/refactor: contract-card-loading

* MaryiaF/refactor: summary-card

* MaryiaF/refactor: SummaryCard

Co-authored-by: Yashim Wong <yashim@deriv.com>

* fix(cashier): avoid screen blinking of restricted pages during the first download (#6039)

* try submitting an id document instead message removed (#5968)

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>

* likith/testing functionality of reset trading password modal  (#5823)

* feat: test cases on reset-trading password-modal

* feat: Added test acses for reset Password modal

* fix: renamed data-testid as per guide

* fix: created a reusable function containing interaction block

* feat: added test case to check navigation reroute

* ref: refactored code

* ref: renamed the testid

* Vinu/Service worker caching (#5887)

* service-worker-precaching in progress

* added images in runtime caching

* added core js file to runtime caching

* number of images to be kept at runtime caching kept at 15

* adjusted path for runtimecaching

* added html files to caching

* removed all files from precaching other than css

* fixed pathnames in config.js

* added path to cache js-core file

* implemented review comments for runtime caching

* implementation on review comments in progress

* added smartchart-files to precaching

* Vinu/Test coverage sent email modal (#5463)

* added test coverage for sent-email-modal

* fixed linting issue in sent-email-modal

* props change in sent-email-modal.spec

* fixed linting issue in sent-email-modal.spec

* rearragned the order of imports in sent-email-modal.spec

* Trigger Build

* Trigger Build

* implemented review comments in sent-email-modal-spec file

* fixed linting issue in sent-email-modal

* implemented review comments for sent email modal test coverage

* adjusted the sent-email-modal spec file as per new guidlines

* implemented review comments in sent-email-modal spec.js file

* gave appropriate name to data-testid in sent-email-modal

* thisyahlen/ added icon for tether trc20 (#6060)

* added icon for tether trc20

* icons revert

* fix for test cases

* changed tooltip for all the tether coins

* fixed the deposit page error and the tusdt lowercase

* translations: 📚 sync translations with crowdin (#6174)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* refactor(confirm component): refactor confirm component, fix tests

* Hirad/ Finished MF urgent changes (#6159)

* Finished MF urgent changes

* Changed the styling of the condition

* Jim / Publisher documentation (#6002)

* docs: update README.md in publisher

* docs: update README.md in publisher

* docs: update README.md in publisher

* Jim / Components documentation (#6008)

* docs: update README.md, add description for valid script and replace lerna bootstrap

* docs: remove empty docs

* docs: update README.md

* docs: update README

* chore: fix end of note in README

* docs: change note in components README.md

* move PositionsDrawerCard from reports to components (#6049)

* yauheni/#69488 changing language for closed market redirecting fix (#5999)

* yauheni/#69488 changing language for closed market redirecting fix

* func name fix

* proptypes fix

* interval delete fix, is_lang_change moved

* store fix for language changing

* several attempts of changing fix

* closed word translation fix

* logout active symbols loading fix

* logout redirection to default markets fix

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>

* Hirad/ Fixed the issue where landing company was shown for eu users who have… (#6078)

* Fixed the issue where landing company was shown for eu users who have just financial options

* Changed the naming convention of one_or_two_cards variable

* made some changes to the naming according to the suggestions

* Pulled from master

Co-authored-by: Matin shafiei <matin@deriv.com>

* Ameerul /Bug 64559 delete pm name handle for long value  (#6107)

* changed the margin-top for mobile view for buy-sell

* merging upstream master

* changed the payment methods list modal and wrapped the text for long bank names

* hamid/overwrite-overflow-of-app-contents-in-cashier (#5915)

* Overwrite overflow of app contents in cashier)

* Update packages/cashier/src/containers/cashier/cashier.scss

Co-authored-by: Nijil Nirmal <62882794+nijil-binary@users.noreply.github.com>

* Update branch and Enhance style

Co-authored-by: Nijil Nirmal <62882794+nijil-binary@users.noreply.github.com>

* george / rm70573 / payment agent error visibility (#6023)

* fix: pa error visibility

* fix failed test

* yauheni/70841 trackJS setUserId should be string (#6139)

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>

* Hirad/ Account switcher demo total asset change (#5622)

* Account switcher total asset is shown correctly

* Changed currency that is shown

* fix--api call is put in useEffect now

* Made the condition shorter

* Removed the redundant parameter in the exchange_rates call

* Pulled from master

* Pulled from master

* Added currency exchange to real account tab of account switcher

* translations: 📚 sync translations with crowdin (#6199)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

Co-authored-by: suisin-deriv <103026762+suisin-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: Nijil Nirmal <62882794+nijil-binary@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: Hamid <hamid@re-work.dev>
Co-authored-by: ashraf-deriv <97999159+ashraf-deriv@users.noreply.github.com>
Co-authored-by: ashrafali-v <ashrafalifrk@gmail.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: Matin shafiei <70938039+matin-binary@users.noreply.github.com>
Co-authored-by: Salar Hafezi <salar@re-work.dev>
Co-authored-by: Matin shafiei <matin@binary.com>
Co-authored-by: hirad-rewok <91878582+hirad-rewok@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Maryia <87321516+maryia-deriv@users.noreply.github.com>
Co-authored-by: Salar Hafezi <76559464+salarhfz-fs@users.noreply.github.com>
Co-authored-by: njazuli-deriv <78890281+njazuli-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Maryia Frantsava <88426229+maryiafrantsava-deriv@users.noreply.github.com>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: vijayasree-deriv <98810931+vijayasree-deriv@users.noreply.github.com>
Co-authored-by: george-usynin-deriv <89790856+george-usynin-deriv@users.noreply.github.com>
Co-authored-by: Artsem Kavaleu <88381164+artsemkavaleu-deriv@users.noreply.github.com>
Co-authored-by: Niloofar Sadeghi <93518187+niloo-fs@users.noreply.github.com>
Co-authored-by: mitra-fs <64970259+mitra-fs@users.noreply.github.com>
Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@firstsource.tech>
Co-authored-by: sara-fs <55442058+sara-fs@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: Likhith Kolayari <likhith@deriv.com>
Co-authored-by: maryiafrantsava-binary <103181650+maryiafrantsava-binary@users.noreply.github.com>
Co-authored-by: Yashim Wong <yashim@deriv.com>
Co-authored-by: yauheni-kryzhyk-deriv <103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: thisyahlen <104053934+thisyahlen-deriv@users.noreply.github.com>
Co-authored-by: jim-deriv <104334373+jim-deriv@users.noreply.github.com>
Co-authored-by: mahdiyeh-fs <82078941+mahdiyeh-fs@users.noreply.github.com>
Co-authored-by: ameerul-deriv <103412909+ameerul-deriv@users.noreply.github.com>

* Revert "george / fix conflicts in pa-redesign branch (#6188)" (#6212)

This reverts commit 93f4389bb039eb2cb8f526e3613222b3dcebb0a6.

* style(transfer-confirm): fix class name (#6213)

* george / rm73705 / fix payment agent search last symbol remaining (#6234)

* style(transfer-confirm): fix class name

* fix(payment agent search): fix payment agent search last symbol remaining

* george / fix failed test in payment-agent-container (#6376)

* style(transfer-confirm): fix class name

* fix(payment agent search): fix payment agent search last symbol remaining

* test(payment agent container): fix failed test

Co-authored-by: Nijil Nirmal <nijil@deriv.com>
Co-authored-by: vinu-deriv <vinu@deriv.com>
Co-authored-by: suisin-deriv <103026762+suisin-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com>
Co-authored-by: Nijil Nirmal <62882794+nijil-binary@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Bahar <bahar@firstsource.tech>
Co-authored-by: Hamid <hamid@re-work.dev>
Co-authored-by: ashraf-deriv <97999159+ashraf-deriv@users.noreply.github.com>
Co-authored-by: ashrafali-v <ashrafalifrk@gmail.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: Matin shafiei <70938039+matin-binary@users.noreply.github.com>
Co-authored-by: Salar Hafezi <salar@re-work.dev>
Co-authored-by: Matin shafiei <matin@binary.com>
Co-authored-by: hirad-rewok <91878582+hirad-rewok@users.noreply.github.com>
Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com>
Co-authored-by: Maryia <87321516+maryia-deriv@users.noreply.github.com>
Co-authored-by: Salar Hafezi <76559464+salarhfz-fs@users.noreply.github.com>
Co-authored-by: njazuli-deriv <78890281+njazuli-deriv@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-autho…
  • Loading branch information
Show file tree
Hide file tree
Showing 250 changed files with 3,149 additions and 1,653 deletions.
1 change: 1 addition & 0 deletions packages/cashier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"classnames": "^2.2.6",
"formik": "^2.1.4",
"loadjs": "^4.2.0",
"lodash.debounce": "^4.0.8",
"mobx": "^5.15.7",
"mobx-react": "6.3.1",
"moment": "^2.29.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import React from 'react';
import { fireEvent, screen, render, waitFor } from '@testing-library/react';
import CashierSearchBox from '../cashier-search-box';

describe('<CashierSearchBox />', () => {
const props = {
onClear: jest.fn(),
onSearch: jest.fn(),
placeholder: 'Search placeholder',
setIsSearchLoading: jest.fn(),
};

it('should have close icon if there is a text in input field', () => {
render(<CashierSearchBox {...props} />);

const el_search_input = screen.getByPlaceholderText('Search placeholder');
fireEvent.change(el_search_input, { target: { value: 'hello' } });

expect(screen.getByTestId('dt_close_icon')).toBeInTheDocument();
});

it('should trigger onClear callback when the user clicks on close icon', () => {
render(<CashierSearchBox {...props} />);

const el_search_input = screen.getByPlaceholderText('Search placeholder');
fireEvent.change(el_search_input, { target: { value: 'hello' } });
const el_close_icon = screen.getByTestId('dt_close_icon');
fireEvent.click(el_close_icon);

expect(props.onClear).toHaveBeenCalledTimes(1);
});

it('should not trigger setTimeout callback (formSubmit) when the user presses backspace button on empty search input', () => {
jest.useFakeTimers();
jest.spyOn(global, 'setTimeout');
render(<CashierSearchBox {...props} />);

const el_search_input = screen.getByPlaceholderText('Search placeholder');
fireEvent.keyDown(el_search_input);

expect(props.setIsSearchLoading).not.toHaveBeenCalled();
expect(setTimeout).not.toHaveBeenCalled();
jest.useRealTimers();
});

it('should trigger setIsSearchLoading, onSearch and setTimeout callbacks when the user enters the search term', async () => {
jest.useFakeTimers();
jest.spyOn(global, 'setTimeout');

render(<CashierSearchBox {...props} />);

const el_search_input = screen.getByPlaceholderText('Search placeholder');
await waitFor(() => {
fireEvent.change(el_search_input, { target: { value: 'hello' } });
fireEvent.keyUp(el_search_input);

expect(props.setIsSearchLoading).toHaveBeenCalled();
expect(setTimeout).toHaveBeenCalled();
expect(props.onSearch).toHaveBeenCalled();
});
jest.useRealTimers();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { Field as FormField, Formik, Form } from 'formik';
import { Icon, Input } from '@deriv/components';
import './cashier-search-box.scss';

const CashierSearchBox = ({ className, onClear, onSearch, placeholder, search_term, setIsSearchLoading }) => {
React.useEffect(() => {
return onClear;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const onSearchClear = setFieldValue => {
setFieldValue('search', '');
onClear();
};

const onSearchKeyUpDown = (submitForm, search) => {
if (!search.trim() && search_term) {
onClear();
} else if (!search.trim()) return;

setIsSearchLoading(true);
submitForm();
};

const onSearchSubmit = ({ search }) => {
onSearch(search);
};

return (
<div className={classNames('cashier-search-box', className)}>
<Formik initialValues={{ search: '' }} onSubmit={onSearchSubmit}>
{({ submitForm, values: { search }, setFieldValue }) => (
<Form>
<FormField name='search'>
{({ field }) => (
<Input
{...field}
type='text'
name='search'
placeholder={placeholder}
onKeyUp={() => onSearchKeyUpDown(submitForm, search)}
onKeyDown={() => onSearchKeyUpDown(submitForm, search)}
leading_icon={<Icon icon='IcSearch' data_testid='dt_search_icon' />}
trailing_icon={
search && (
<Icon
color='general'
data_testid='dt_close_icon'
icon='IcCloseCircle'
onClick={() => onSearchClear(setFieldValue)}
/>
)
}
/>
)}
</FormField>
</Form>
)}
</Formik>
</div>
);
};

CashierSearchBox.propTypes = {
className: PropTypes.string,
onClear: PropTypes.func,
onSearch: PropTypes.func,
placeholder: PropTypes.string,
search_term: PropTypes.string,
setIsSearchLoading: PropTypes.func,
};

export default CashierSearchBox;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.cashier-search-box {
width: 100%;
margin-right: 1.6rem;
.dc-input {
margin-bottom: 0;
height: 3.2rem;
overflow: hidden;
&__field {
padding: 0.6rem 3.2rem;
height: 3.2rem;
}
&__leading-icon {
margin-left: 0.8rem;
top: 0.8rem;
}
&__trailing-icon {
cursor: pointer;
}
}
}
3 changes: 3 additions & 0 deletions packages/cashier/src/components/cashier-search-box/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import CashierSearchBox from './cashier-search-box.jsx';

export default CashierSearchBox;
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { connect } from 'Stores/connect';
import { TRootStore, TError, TReactElement } from 'Types';

type TErrorDialogProps = {
className: string;
disableApp: () => void;
enableApp: () => void;
error: TError | Record<string, never>;
Expand All @@ -21,7 +22,7 @@ type TSetDetails = {
has_close_icon?: boolean;
};

const ErrorDialog = ({ disableApp, enableApp, error = {} }: TErrorDialogProps) => {
const ErrorDialog = ({ className, disableApp, enableApp, error = {} }: TErrorDialogProps) => {
const history = useHistory();
const [is_visible, setIsVisible] = React.useState(false);
const [details, setDetails] = React.useState<TSetDetails>({
Expand Down Expand Up @@ -126,6 +127,7 @@ const ErrorDialog = ({ disableApp, enableApp, error = {} }: TErrorDialogProps) =
title={details.title}
confirm_button_text={details.confirm_button_text}
cancel_button_text={details.cancel_button_text}
className={className}
onConfirm={() => {
if (typeof details.onConfirm === 'function') {
details.onConfirm();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import React from 'react';
import { Money } from '@deriv/components';
import { Localize } from '@deriv/translations';
import { fireEvent, render, screen } from '@testing-library/react';
import TransferConfirm from '../transfer-confirm';

Expand All @@ -10,9 +8,8 @@ jest.mock('Stores/connect', () => ({
connect: () => Component => Component,
}));

let modal_root_el;

describe('<TransferConfirm />', () => {
let modal_root_el;
beforeAll(() => {
modal_root_el = document.createElement('div');
modal_root_el.setAttribute('id', 'modal_root');
Expand All @@ -22,90 +19,97 @@ describe('<TransferConfirm />', () => {
afterAll(() => {
document.body.removeChild(modal_root_el);
});

const props = {
data: [
{ key: 'pa', label: 'Payment agent', value: 'Payment Agent of CR90000561 (Created from Script)' },
{ key: 'amount', label: 'Amount', value: <Money amount='100' currency='USD' show_currency /> },
{ key: 'test', label: 'test', value: ['test1', 'test2'] },
{ key: '1', label: 'label 1', value: 'value 1' },
{ key: '2', label: 'label 2', value: ['value 2', 'value 3'] },
],
header: 'Please confirm the transaction details in order to complete the withdrawal:',
error: {},
onClickBack: jest.fn(),
onClickConfirm: jest.fn(),
warning_messages: [
<Localize
i18n_default_text='Remember, it’s solely your responsibility to ensure the transfer is made to the correct account.'
key={0}
/>,
<Localize i18n_default_text='We do not guarantee a refund if you make a wrong transfer.' key={1} />,
],
};

it('should show proper icon, header, messages and buttons', () => {
it('should show proper icon, messages and buttons', () => {
render(<TransferConfirm {...props} />);

expect(screen.getByTestId('dti_confirm_details_icon')).toBeInTheDocument();
expect(
screen.getByText('Please confirm the transaction details in order to complete the withdrawal:')
).toBeInTheDocument();
expect(screen.getByText('Payment agent')).toBeInTheDocument();
expect(screen.getByText('Payment Agent of CR90000561 (Created from Script)')).toBeInTheDocument();
expect(screen.getByText('Amount')).toBeInTheDocument();
expect(screen.getByText('100.00 USD')).toBeInTheDocument();
expect(screen.getByText('test')).toBeInTheDocument();
expect(screen.getByText('test1')).toBeInTheDocument();
expect(screen.getByText('test2')).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Back' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Confirm' })).toBeInTheDocument();
const [back_btn, transfer_now_btn] = screen.getAllByRole('button');

expect(screen.getByTestId('dt_red_warning_icon')).toBeInTheDocument();
expect(screen.getByText('label 1')).toBeInTheDocument();
expect(screen.getByText('value 1')).toBeInTheDocument();
expect(screen.getByText('label 2')).toBeInTheDocument();
expect(screen.getByText('value 2')).toBeInTheDocument();
expect(screen.getByText('value 3')).toBeInTheDocument();
expect(screen.getByRole('checkbox')).toBeInTheDocument();
expect(screen.getByText(/please ensure/i)).toBeInTheDocument();
expect(screen.getByText(/all details/i)).toBeInTheDocument();
expect(screen.getByText(/are/i)).toBeInTheDocument();
expect(screen.getByText(/correct/i)).toBeInTheDocument();
expect(screen.getByText(/before making your transfer/i)).toBeInTheDocument();
expect(screen.getByText(/we/i)).toBeInTheDocument();
expect(screen.getByText(/do not/i)).toBeInTheDocument();
expect(screen.getByText(/guarantee a refund if you make a wrong transfer/i)).toBeInTheDocument();
expect(back_btn).toBeInTheDocument();
expect(transfer_now_btn).toBeInTheDocument();
});

it('should show error messages and button', () => {
render(
<TransferConfirm
{...props}
error={{
code: 'code',
message: 'error_message',
}}
/>
);

expect(screen.getByText('Cashier Error')).toBeInTheDocument();
expect(screen.getByText('error_message')).toBeInTheDocument();
expect(screen.getAllByRole('button')[2]).toBeInTheDocument();
});

it('should trigger onClick callback when the client clicks on Back button', () => {
it('should trigger onClickBack method when the client clicks on Back button', () => {
render(<TransferConfirm {...props} />);

const el_back_btn = screen.getByRole('button', { name: 'Back' });
fireEvent.click(el_back_btn);
const [back_btn, _] = screen.getAllByRole('button');
fireEvent.click(back_btn);

expect(props.onClickBack).toHaveBeenCalledTimes(1);
});

it('should trigger onClick callback when the client clicks on Confirm button', () => {
it('should enable Transfer now button when checkbox is checked', () => {
render(<TransferConfirm {...props} />);

const el_confirm_btn = screen.getByRole('button', { name: 'Confirm' });
fireEvent.click(el_confirm_btn);
expect(props.onClickConfirm).toHaveBeenCalledTimes(1);
});
const el_checkbox = screen.getByRole('checkbox');
const [_, transfer_now_btn] = screen.getAllByRole('button');
fireEvent.click(el_checkbox);

it('should show error message', () => {
render(<TransferConfirm {...props} error={{ message: 'Error message' }} />);

expect(screen.getByText('Error message')).toBeInTheDocument();
expect(transfer_now_btn).toBeEnabled();
});

it('should show warning messages', () => {
render(<TransferConfirm {...props} />);
it('should show proer checkbox label text when is_payment_agent_withdraw property is equal to true/false', () => {
const { rerender } = render(<TransferConfirm {...props} is_payment_agent_withdraw />);

expect(
screen.getByText(
'Remember, it’s solely your responsibility to ensure the transfer is made to the correct account.'
)
screen.getByLabelText('I confirm that I have verified the payment agent’s transfer information.')
).toBeInTheDocument();
expect(screen.getByText('We do not guarantee a refund if you make a wrong transfer.')).toBeInTheDocument();
});

it('should show checkbox when is_payment_agent_transfer property is equal to true', () => {
render(<TransferConfirm {...props} is_payment_agent_transfer />);
rerender(<TransferConfirm {...props} />);

expect(
screen.getByLabelText('I confirm that I have verified the client’s transfer information.')
).toBeInTheDocument();
});

it('should enable "Transfer now" button when checkbox is checked', () => {
render(<TransferConfirm {...props} is_payment_agent_transfer />);
it('should trigger onClickConfirm method when the client clicks on Transfer now button', () => {
render(<TransferConfirm {...props} />);

const el_checkbox_transfer_consent = screen.getByRole('checkbox');
fireEvent.click(el_checkbox_transfer_consent);
const el_btn_transfer_now = screen.getByRole('button', { name: 'Transfer now' });
const el_checkbox = screen.getByRole('checkbox');
const [_, transfer_now_btn] = screen.getAllByRole('button');
fireEvent.click(el_checkbox);
fireEvent.click(transfer_now_btn);

expect(el_btn_transfer_now).toBeEnabled();
expect(props.onClickConfirm).toHaveBeenCalledTimes(1);
});
});
Loading

1 comment on commit 4d165e3

@vercel
Copy link

@vercel vercel bot commented on 4d165e3 Oct 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-app – ./

deriv-app.vercel.app
deriv-app-git-master.binary.sx
binary.sx
deriv-app.binary.sx

Please sign in to comment.