From 14bde8c0b9443eb9b3231782d2060a0c7dbc2a58 Mon Sep 17 00:00:00 2001 From: hirad-rewok <91878582+hirad-rewok@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:39:50 +0330 Subject: [PATCH] Hirad/78900/add derived functionality (#6788) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * translations: πŸ“š sync translations with crowdin (#6366) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6373) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * fix bug (#6154) * yauheni/ 70488/ edit note in self-exclusion message box (#6044) * text|edit_note_self_exclusion_message_box * test fix * regexp in tests fix * accident text deleted * popup message text fix * text fixes * test text query fix Co-authored-by: β€œyauheni-kryzhyk-deriv” <β€œyauheni@deriv.me”> * Akmal / Ignore IDV verification if client is high risk && withdrawals are locked (#4644) * Ignore IDV verification if client is high risk * Fix formatting * Fix cfd-poi issue due to client store unavailability * Fix formatting * Merge with master * Fix formatting * Merge with master * Revert "Merge with master" This reverts commit 4bead99f8c318caaee22e3e49bfd0159af8d0d65. * Fix merge issues * Chain extra condition to cover wrong status returned from BE * Fix: wrong component shown when manual upload is triggered * fix:tax_number_validation (#6259) * george / rm65047 / convert routes, cashier, error-component components to TS (#6361) * perf(cashier routes): convert csahier routes to TS * perf(cashier routes): convert error-component to TS * refactor(error-dialog, types): refactor error-dialog types, move error type to shared types * perf(cashier): convert cashier to TS * perf(types): refactor types * refactor(routes with sub routes): refactor default subroute * refactor(types): add/refactor server error type * test: refactor pathname * refactor(route types): refactor route types * fix: fix ts error in React.Suspense * george / rm65033 / ts migration of withdraw UI components (#6343) * perf(cashier withdraw): convert withdrawal-verification-email to TS * perf: add data-testid for checklist action * perf(cashier withdraw): convert withdrawal-locked to TS * perf(types): add types for TClinetStore * perf(cashier withdraw): convert withdraw to TS * perf(cashier withdraw): convert crypto-withdraw-receipt to TS * perf(cashier withdraw): convert crypto-withdraw-form to TS * perf(cashier withdraw): convert withdrawal to TS * refactor(cashier withdraw): refactor array syntax (ts) * test(cashier withdraw): remove eslint disables for tests * update deriv go redirection link (#6386) * Farzin/68320/Update cashier withdrawal locked status if PA already withdraw all his allowable withdrawal amount (#6032) * fix(cashier): :sparkles: handle `PACommisionWithdrawalLimit` state in `CashierLocked` * test(cashier): :white_check_mark: add test case to `CashierLocked` for `PACommisionWithdrawalLimit` * Trigger Build * Jim/73479/appstore-workspace-ts-fix (#6208) * chore: update appstore tsconfig * chore: update appstore tsconfig * chore: add react and types/react packages to appstore * refactor: remove unnecessary includes * refactor: change from reexports to import -> export * Niloofar Sadeghi / Trader Typescript configuration issue (#6275) * fix: trader typscript configuration issue * fix: tsc errors on trader * Niloofar Sadeghi / Add typescript configuration on reports (#6276) * chores: add typescript configuration on reports * fix: remove extra paths * fix: revert removing packages * george / rm65041 / migrate p2p-cashier component to TS (#6177) * refactor(p2p-cashier): migrate p2p-cashier component to TS * commit * perf(types): add types for notification store * perf(types): add types for ui store * perf(types): convert p2p-cashier to TS * refactor(types): change RootStore type to TRootStore * test(p2p-cashier): test fix (change wrapper order fro p2p-cashier component) * refactor(types): refactor current_focus type * test(p2p-cashier): remove eslint disables * Vinu/Ts onramp cashier (#5727) * refactor: converted on-ramp module into typescript * refactor: included type related to store in on-ramp * ts fix in on-ramp-provider-card.spec.tsx * added path in tsconfig * added path in tsconfig * added type for react-router-dom * added ts related change required for migrating all components (#5760) * changed the name of data-testid in on-ramp component * ts-migration-crypto-fiat-converter (#5796) * Trigger build * Update package-lock * ts-migration-cashier-notifications (#5765) * implemented review comments and updated branch as per latest upstream branch * 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) * corrected imports in on-ramp pages * coreected setSideNotes type in on-ramp file * arranged the order of imports in on-ramp * refactor: add menu-option type to types folder in cashier * replaced type for FormEvent in on-ramp from Types * added types from TRootstore * added types of TClientStore, TUiStore and TCommonStore in on-ramp Co-authored-by: Nijil Nirmal Co-authored-by: Bahar Co-authored-by: Hamid * hamid/65036/migrate-account-transfer-to-ts (#6305) * Migrate Account Transfer to TS * Enhance type names * Remove eslint ignore line * Remove generic type from useState * trigger tests * Fix test errors * Change data-testid name * Niloofar Sadeghi / Account typscript configuration issue (#6273) * fix: account typscript configuration issue * text: remove include comment on account tsconfig * Niloofar Sadeghi / Circleci issue (#6402) * fix: circle ci issue * fix: circle ci issue * Niloofar Sadeghi / Add typescript to each workspace dependency (#6306) * build: add typescript to all packages * build: move typescript to devdependency * add some TS configs to eslint file * fix: conflicts * Shayan/74388/fix ts config on cfd (#6351) * checking circle/ci test * removed test changes * fix: updated tsconfig and fixed some errors * fix: updated tsconfig and added globals.d.ts * chore: removed experimentalsDecorators from local config * translations: πŸ“š sync translations with crowdin (#6405) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * hamid/75726/missing-grey-box-side-note (#6410) * Fix sidenote in mobile view of account-transfer * Remove duplicate title * Add sideNote title * translations: πŸ“š sync translations with crowdin (#6413) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * Revert "george / rm65041 / migrate p2p-cashier component to TS (#6177)" (#6424) This reverts commit 503e77ecc4cfc7097bbef7396d2dc08a72fdcc65. * P2p 2fa feature (#6422) * carol/ P2P: 2FA (#6009) * add: icons * add: one more icon * add email verification modal * add invalid verification link modal * add email verified * add email blocked modal * add email blocked modal * use align prop instead * carol/ P2P: Email verification for orders (#6299) * fix: quotes * add: email verification * cleanup * don't kill me * add response checks * add comment * add: amount + currency * fixed loading of order details and chat * fixed design on responsive * fixed verification modal in responsive * show modal if error * fix * fixed truncated modal in ios * fix time * fix invalid verification modal * fix * fix * fixed verification modal in desktop * fix responsive +logged out user * fix: design for seller * the solution to all my problems * fix: modal * fix logout + modal * hide extra modal * i got 99 problems and 2fa is all of em * fix * fix * fix: amount * fix: amount * fix: add modal * fix: rating modal Co-authored-by: Farrah Mae Ochoa Co-authored-by: Nijil Nirmal Co-authored-by: Farrah Mae Ochoa * translations: πŸ“š sync translations with crowdin (#6426) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * Added scroll to cfd personal details modal (#6235) * Shayan/74387/Update TS Config and Fix TS Errors on Cashier (#6284) * checking circle/ci test * removed test changes * fix: updated ts config and fixed two errors returnd by tsc * fix: fixing errors returned by tsc (WIP) * fix: fixed all ts errors * chore: removed experimentalDecorators from tsconfig * fix: removed unnecessary path from tsconfig * fix: type added to transfer_to_hint * Fixed the font size for non authenticated svg accounts (#6077) * Farzin/70813/Fix date picker month issue for non english languages (#6027) * fix(components): :bug: fix date picker month issue for non english languages by setting moment locale to `en` * refactor(components): :recycle: refactor `calendar-months` component to rely on month number instead of month name * fix(components): :globe_with_meridians: add localization support for date picker month names * refactor(components): :fire: remove redundant `month_headers` * chore(components): :heavy_minus_sign: remove redundant `@deriv/translations` dependency * Trigger Build * fix(cashier): :memo: resolve PR comments * remove disabled country validation from citizenship (#6236) * farabi/improved-numpad-for-visibility (#6241) * farabi/improved-numpad-for-visibility * changed value to global variable Co-authored-by: Farabi * farabi / added a new tooltip for contract type 'both' (#6189) * added a new tooltip for contract type both * branch update Co-authored-by: Farabi * george / rm73888 / fix Transfer button enabling when amount field is empty (#6252) * fix(account transfer): fix Transfer button enabling when amount field is empty * fix(account transfer): fix Transfer button enabling between account with the same currency * refactor(account transfer): refactor condition into function * fix(account transfer): disable Transfer button when amount is not valid * fix(account transfer): fix validation error visibility * likhith/incorporating a nation id image for ZW (#6175) * feat: incorporating a nation id image for ZW * feat: replaced image for zw identity card * fix: regex format of sample input * fix: replaced image for zw * george / rm74876 / missing payment agent's phone number and url address (#6337) * fix(payment agent withdraw): fix pa's phone number and url address visibility in receipt * style(payment agent withdraw): fix style for submit buttons * test(payment agent withdraw): refactor tests * test(payment agent store): fix tests * Niloofar Sadeghi / Jest issue with typescript (#6442) * fix: indicator ts-jest config * fix: add ts-jest to the root of the project * fix: resolve comments * fix: review comments * translations: πŸ“š sync translations with crowdin (#6470) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6471) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6472) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6475) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6476) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * use github action token (#6335) * mobile_fix (#6481) * translations: πŸ“š sync translations with crowdin (#6482) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6486) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * fix auto pr creation (#6487) * translations: πŸ“š sync translations with crowdin (#6489) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6491) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6493) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * carol/Derivgo link (#6445) * use platform from query params to set app id * add: check * thisyahlen/ test coverage for cfd-account-card component (#5903) * first commit, managed to render the component * added derivx test cases * type fix * added a few more test cases * covered commission message to make it 80% * moved the new props * moved the new props * finished up mt5 tests * added dxtrade * added derivx and more mt5 test cases * added beforeeach * description change * changed file to typescript * removed mfsa and used svg Co-authored-by: Thisyahlen * Maryia/chore: add test coverage for cfd-dashboard (#6181) * Maryia/chore: add test coverage for cfd-dashboard * Added more tests * removed unnecessary check * added more tests * added more tests + improvements * finalized tests for CFD dashboard * fix: PropTypes warning * migrated test file to tsx * avoiding direct dom node access * removed redundant global before window * moved props outside beforeEach as they are never redefined, neither do their properties * improved tests and added props types * Fix word break in payment agent contant details (#5953) * thisyahlen/ test coverage for investor-password-manager (#5973) * test coverage for investor-password-manager * refractored the test and tested again for the new bvi changes * refractored code for better readability * changed descriptions and lowercase * fix spelling errors * removed repeated test case * thisyahlen/cfd-server-error-dialog test coverage (#5767) * test coverage for cfd-server-error-dialog container * test coverage for cfd-server-error-dialog * changed role and added an error message test case * remove screen debug * removed last test case Co-authored-by: Thisyahlen * thisyahlen/test coverage on compare-accounts-content container (#5847) * first commit * added test case for derivx * added residence for derivx test case * added a few more test cases * refractored the code * removed test case and changed description * refractored the test * changed eu to true Co-authored-by: Thisyahlen Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com> * likhith/test cases for CFD password modal (#6202) * feat: incorporated test cases * feat: incorporated test cases to test password modal for Financial STP and DerivX * fix: failing test case * ref: incorporated review comments * feat: incorporated error message check * fix: incorporated review comments * fix: incorporated review comments * fix: retitled the test cases * fix: incorporated review comments * fix: reducing duplicated code * fix: removed commented code * fix: removed commented code * ref: refactored the code * hamid/hide-reset-balance (#6104) * Hide reset button if balance is 10000 * Fix console error of propTypes * Change the location of the condition * Add const for account init balance * Ignore eslint warning * Change namve convention of the method * translations: πŸ“š sync translations with crowdin (#6508) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * hamid/76567/fix-word-break-pa (#6511) * Fix word break in payment agent contant details * Fix word break in payment agent contant details * carol/ P2P: Remove confirm modal (#6430) * remove extra modal from 2FA flow * hide reasons * Suisin/created scam warning pop up message (#6358) * created scam warning pop up message * Update website logo * Updated Scam Message Logo * changed client_country to br * rearrange imports * Updated all issue according to github comments * Update scss design * Update scss and modal * Update className and scss * Update scss margins for title * Update Modal into the correct component * Update dark mode and change country code from my to br * Update ui store to call function and set function * change my to br * Update UI Store and Update Scss modal * Update ui store * Remove unused width in modal * Update my to br * Update values for locaization for brandName and remove unuse scamMessageDisplay * Update logic for local storage * Update Toggle Modal Element * Update logout to remove localStorage element for scamMessage * Moving localStorage.removeItem to cleanUp function * Update scss and remove is_dark_mode * Update my to br * Not to display on Signup Page * Update new logic on not displaying message in new account * rearrange functions * Update Scss for mobile view * Update packages/core/src/App/Containers/WarningScamMessageModal/warning-scam-message.jsx Co-authored-by: Farzin Mirzaie <72082844+farzin-fs@users.noreply.github.com> * Update Scss format * Update divider into the modal Co-authored-by: Farzin Mirzaie <72082844+farzin-fs@users.noreply.github.com> Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com> * likhith/track js reading loginid of undefined (#6452) * fix: added a fallback case if virtual account is not available * fix: added fallback to missing objects containing loginid Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6548) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * hamid/74062/cfd-dashboard-demo-account (#6427) * Add required packages and icon and update qrcode * CFD dashboard for demo account * Fix tests errors * Fix PR comments * Add Huawei Link * Resolve PR comments * Edit SCSS classes * Resolve conflict * Change dxtrade type from synthetic to all * Resolve PR comments * Change texts * Apply QA commnets * Update AccoutSwitcher * Fix tests errors * Remove unneeded code * Enhance code * Run svgo for new dxtrade icons * Change QRCode url * Change QRCode url * Enhance Code * Check enabled property for existing accounts * Hide disabled account in the Account-Switcher * Change icon and text of the succes modal * Change Title of account information modal: currency * Add mobile app hint * Update Password Modal Text * Add TODO Co-authored-by: Yashim Wong * translations: πŸ“š sync translations with crowdin (#6569) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6570) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6571) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * translations: πŸ“š sync translations with crowdin (#6572) Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com> * Fixed translation files * Fixed translation files * Add derived functionality 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: Eduard Hrachou <107860964+eduard-deriv@users.noreply.github.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: Akmal Djumakhodjaev Co-authored-by: amina-deriv <84661147+amina-deriv@users.noreply.github.com> Co-authored-by: George Usynin <103181646+george-usynin-binary@users.noreply.github.com> Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com> Co-authored-by: Farzin Mirzaie <72082844+farzin-fs@users.noreply.github.com> Co-authored-by: Jim Daniels Wasswa <104334373+jim-deriv@users.noreply.github.com> Co-authored-by: Niloofar Sadeghi <93518187+niloo-fs@users.noreply.github.com> Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com> Co-authored-by: Nijil Nirmal Co-authored-by: Bahar Co-authored-by: Hamid Co-authored-by: Shayan Khaleghparast <100833613+iman-fs@users.noreply.github.com> Co-authored-by: Farrah Mae Ochoa Co-authored-by: Farabi <102643568+farabi-deriv@users.noreply.github.com> Co-authored-by: Farabi Co-authored-by: Farabi Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com> Co-authored-by: balakrishna-binary <56330681+balakrishna-binary@users.noreply.github.com> Co-authored-by: thisyahlen <104053934+thisyahlen-deriv@users.noreply.github.com> Co-authored-by: Thisyahlen Co-authored-by: Maryia <103177211+maryia-binary@users.noreply.github.com> Co-authored-by: Sui Sin <103026762+suisin-deriv@users.noreply.github.com> Co-authored-by: Yashim Wong --- .../appstore/src/components/CFDs/cfd-real-accounts.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/appstore/src/components/CFDs/cfd-real-accounts.tsx b/packages/appstore/src/components/CFDs/cfd-real-accounts.tsx index da914a556d3a..031eddf0cc9f 100644 --- a/packages/appstore/src/components/CFDs/cfd-real-accounts.tsx +++ b/packages/appstore/src/components/CFDs/cfd-real-accounts.tsx @@ -168,7 +168,14 @@ const CFDRealAccounts = ({ account.platform !== CFD_PLATFORMS.DXTRADE && ( null} + onClickHandler={() => { + toggleJurisdictionModal(); + setAccountType({ + category: 'real', + type: account.type, + }); + setAppstorePlatform(account.platform); + }} class_names='cfd-real-account__accounts--item__add-derived' /> )}