Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobx migration to v6 #1

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
8f2c9d3
translations: 📚 sync translations with crowdin (#5140)
github-actions[bot] Apr 1, 2022
61fbedd
Matin/Chore: Rename Smart Fx to Basket indices - DMT5 & Deriv X (#4776)
matin-deriv Apr 8, 2022
5d17fdc
translations: 📚 sync translations with crowdin (#5169)
github-actions[bot] Apr 8, 2022
5a552f6
Maryia/Loading favicons based on size & excluded them from service wo…
maryia-deriv Apr 11, 2022
c049105
Maryia/Hotfix for basket indices in Open Positions & in DBot Quick st…
maryia-deriv Apr 11, 2022
699dc4a
Revert "Maryia/Loading favicons based on size & excluded them from se…
matin-deriv Apr 11, 2022
2e43822
bahar/landing_on_dtrader_responsive_page_frequently_after_clicking_ca…
Apr 14, 2022
288afc2
Sara / Fixed issue with list rename (#5160)
sara-fs Apr 14, 2022
a261fca
resolve startsWith error (#5215)
mehrzad-fs Apr 14, 2022
401389c
likhith/fixed:Payment method FE issues (#5120)
likhith-deriv Apr 14, 2022
d96d143
Ako/ Codecov master branch coverage (#5115)
Apr 14, 2022
2c14bff
george / add tests for verification_store in cashier package (#5201)
heorhi-deriv Apr 14, 2022
9237ef6
george / add tests for payment agent transfer store (#5194)
heorhi-deriv Apr 14, 2022
4e0ac9c
george / add tests for iframe store (#5196)
heorhi-deriv Apr 14, 2022
4e668c9
george / add tests for error_store in cashier package (#5200)
heorhi-deriv Apr 14, 2022
11dad3c
added account prompt dialog store tests (#5152)
farrah-deriv Apr 14, 2022
9ce2b2d
likhith/Test cases for nickname form (#5030)
likhith-deriv Apr 14, 2022
57ad89a
Amina/test_coverage_for_missing_personal_details_in_accounts_package …
amina-deriv Apr 14, 2022
265cbd8
yauheni/#54657 poa-needs-review test coverage (#5213)
yauheni-deriv Apr 14, 2022
5dfee58
yauheni/added test coverage for poa-expired (#5208)
yauheni-deriv Apr 14, 2022
8903b3c
Amina/test coverage for Poa_continue_button in accounts package (#5091)
amina-deriv Apr 14, 2022
f790a19
Amina/test coverage for poa-button in accounts package (#5090)
amina-deriv Apr 14, 2022
51c5968
Amina/ test_coverage_for_personal_details_in_accounts_package (#5176)
amina-deriv Apr 14, 2022
58875a4
Amina/test_coverage for icon_message_list in account package (#5097)
amina-deriv Apr 14, 2022
5e007d6
test case (#5226)
amina-deriv Apr 14, 2022
6dcb8e7
fix trade badge (#5223)
carolsachdeva Apr 14, 2022
83fcb87
Amina/test coverage for accounts_limits spec (#5060)
amina-deriv Apr 14, 2022
481b813
yashim/chore: bumped postcss/babel related packages. fixed bootstrap …
yashim-deriv Apr 14, 2022
383fa6e
george / add test coverage for "confirm" component (#5198)
heorhi-deriv Apr 14, 2022
1a06b64
Aswathy/test case for error dialog box (#4959)
aswathy-deriv Apr 14, 2022
7b1e08b
translations: 📚 sync translations with crowdin (#5261)
github-actions[bot] Apr 14, 2022
a2256ad
Revert "Amina/test coverage for accounts_limits spec (#5060)" (#5263)
carolsachdeva Apr 14, 2022
7872681
Hirad/ Made CFD an independent package (#5264)
hirad-deriv Apr 18, 2022
0347c27
automate email change for non social accounts (#5038)
mahdiyeh-deriv Apr 18, 2022
daf3591
Hirad/The issue with trust pilot button styling is fixed (#5118)
hirad-deriv Apr 18, 2022
303b616
MaryiaF/fix: hash = undefined in URL on DMT5 and DerivX (#5175)
maryia-matskevich-deriv Apr 20, 2022
fbdbd08
Bump Binary-com/vercel-preview-url-action version (#5285)
matin-deriv Apr 20, 2022
1b35c86
chore: use latest vercel action (#5289)
yashim-deriv Apr 21, 2022
1a9f9ca
Mahdiyeh/ Fix: rerendering the TradingPasswordModal component (#5286)
mahdiyeh-deriv Apr 21, 2022
0df117e
Bump vercel preview url action to v1.0.4 (#5292)
matin-deriv Apr 21, 2022
3310ac0
fix: vercel url fetching (#5294)
yashim-deriv Apr 21, 2022
0f01f87
translations: 📚 sync translations with crowdin (#5295)
github-actions[bot] Apr 25, 2022
97e797b
Amina /Uk_account_closure_ toastbox (#5300)
amina-deriv Apr 25, 2022
867944b
Sara / fixed issue with nested list (#5288)
sara-fs Apr 26, 2022
219f868
Mahdiyeh/Fix: empty positions on mobile (#5275)
mahdiyeh-deriv Apr 26, 2022
ec0b3d6
Fix zero last digit list block (#5195)
rupato-deriv Apr 26, 2022
1a8350e
Vinu /changed app.jsx in cashier from class component to function bas…
vinu-deriv Apr 26, 2022
c0eda01
fix: ad modal visible only when advertiser hit daily limit (#5301)
carolsachdeva Apr 26, 2022
b6cb18e
Hubert / Unexpected token u in JSON at position 0 (#5096)
hubert-deriv Apr 26, 2022
e99f1fb
Added a check to execute code if response is obtained (#5041)
likhith-deriv Apr 26, 2022
5750bfb
likhith/greying out payment method when ad is disabled (#4991)
likhith-deriv Apr 26, 2022
5041008
khalid/precommit hooks (#5171)
khalid-deriv Apr 26, 2022
7a80c86
Revert "khalid/precommit hooks (#5171)" (#5324)
matin-deriv Apr 27, 2022
5a31e4f
george / automation of pa withdrawals activation (#5206)
heorhi-deriv Apr 27, 2022
fffb2f8
likhith/payment method selection resets on tab change (#4999)
likhith-deriv Apr 27, 2022
37759fd
likhith/fixed the toggle issue in privacy setting (#5007)
likhith-deriv Apr 27, 2022
77861e5
Hirad/Mobile active language update issue (#5132)
hirad-deriv Apr 27, 2022
19547f8
george / fix refreshNotifications action in notification store (#5199)
heorhi-deriv Apr 27, 2022
d157baa
Cashier errorcomponent testcase (#4879)
ashraf-deriv Apr 27, 2022
69921d4
Matin/Chore: Change no open position message (#5159)
matin-deriv Apr 27, 2022
c5cc17c
fix for search content overflow on flyout search popup (#5151)
rupato-deriv Apr 27, 2022
26f3d7a
Fix notify messsage color block (#5155)
rupato-deriv Apr 27, 2022
a9203e4
Revert "Revert "Maryia/Loading favicons based on size & excluded them…
matin-deriv Apr 27, 2022
1c11215
translations: 📚 sync translations with crowdin (#5336)
github-actions[bot] Apr 27, 2022
6989d46
likhith/Fixed title of add Payment method (#5136)
likhith-deriv Apr 28, 2022
3fed411
farrah/ added test coverage for TransactionHistoryStore (#5161)
farrah-deriv Apr 28, 2022
a1e792c
Nikita / Task - Add test coverage for "LoadErrorMessage" component in…
nikita-binary Apr 28, 2022
743b5bd
Vinu/Crypto fiat converter store tests (#5316)
vinu-deriv Apr 28, 2022
401f25e
yauheni/#54693 SelfExclusion and subcomponents test coverage (#5252)
yauheni-deriv Apr 28, 2022
5360d58
Artsem / Disable popovers + change color if user is barred (#5191)
artsemkavaleu-binary Apr 28, 2022
9e98ae8
Akmal / Add onfido name comparison notifications (#5129)
akmal-deriv Apr 28, 2022
48eaef2
Adrienne/Fixed floating-point notations on buy/sell ads input amount …
adrienne-deriv Apr 28, 2022
f61efab
Vinu/Change in style of add new link inside payment method tab in p2p…
vinu-deriv Apr 28, 2022
0909635
yauheni/54663 poi_button test coverage (#5280)
yauheni-deriv Apr 28, 2022
f40ae38
yauheni/54639 financial-details test coverage (#5299)
yauheni-deriv Apr 28, 2022
0ab9383
yauheni/54664 poi-country-selector test coverage (#5298)
yauheni-deriv Apr 28, 2022
ac237bf
george / added withdrawal locked for pa (#5204)
heorhi-deriv Apr 28, 2022
dffd9d1
translations: 📚 sync translations with crowdin (#5354)
github-actions[bot] Apr 28, 2022
cf9c3b4
update_content (#5356)
amina-deriv Apr 28, 2022
925f96c
translations: 📚 sync translations with crowdin (#5357)
github-actions[bot] Apr 28, 2022
b765e17
Merge branch 'master' of github.com:binary-com/deriv-app into mobx-mi…
Apr 28, 2022
8076db1
upgrade MobX versions
Apr 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ commands:
- "packages/cashier/node_modules"
- "packages/components/node_modules"
- "packages/core/node_modules"
- "packages/cfd/node_modules"
- "packages/indicators/node_modules"
- "packages/p2p/node_modules"
- "packages/shared/node_modules"
Expand Down
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@

/packages/cashier/**/* @bahar-fs @nijil-binary

# ==============================================================
# deriv-app/cfd
# ==============================================================

/packages/cfd/**/* @balakrishna-binary @matin-binary @yashim-deriv

# ==============================================================
# deriv-app/trader
# ==============================================================
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Codecov Workflow
on: [ "pull_request" ]
on:
pull_request:
branches:
- '**'
push:
branches:
- master
jobs:
build:
name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_app_id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Capture Vercel preview URL
id: vercel_preview_url
uses: binary-com/vercel-preview-url-action@v0.0.3
uses: binary-com/vercel-preview-url-action@v1.0.5
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Deriv App ID for deployment Preview URL
Expand Down
1 change: 1 addition & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }],
["@babel/plugin-proposal-private-methods", { "loose": true }],
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-export-namespace-from",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
"@babel/plugin-proposal-unicode-property-regex": "^7.12.1",
"@babel/plugin-proposal-unicode-property-regex": "^7.16.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
Expand Down
156 changes: 78 additions & 78 deletions packages/account/package.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
{
"name": "@deriv/account",
"private": true,
"version": "1.0.0",
"description": "Deriv account management module",
"author": "Deriv.com",
"homepage": "https://github.com/binary-com/deriv-app",
"license": "Apache-2.0",
"main": "dist/account/js/account.js",
"bugs": {
"url": "https://github.com/binary-com/deriv-app/issues"
},
"engines": {
"node": "^14.17.1"
},
"scripts": {
"start": "npm run test && npm run serve",
"serve": "echo \"Serving...\" && webpack --progress --watch --config \"./build/webpack.config.js\"",
"build": "f () { webpack --config \"./build/webpack.config.js\" --env base=$1;}; f",
"build:travis": "rimraf dist && webpack --config \"./build/webpack.config.js\" --mode=production",
"test": "echo \"No test specified\"",
"test:eslint": "eslint \"./src/**/*.?(js|jsx)\"",
"deploy": "echo \"No deploy specified\"",
"deploy:clean": "echo \"No deploy:clean specified\"",
"deploy:folder": "echo \"No deploy:folder specified\"",
"deploy:staging": "echo \"No deploy:staging specified\"",
"deploy:production": "echo \"No deploy:production specified\""
},
"dependencies": {
"@binary-com/binary-document-uploader": "github:binary-com/binary-document-uploader",
"@deriv/components": "^1.0.0",
"@deriv/shared": "^1.0.0",
"@deriv/translations": "^1.0.0",
"bowser": "^2.9.0",
"classnames": "^2.2.6",
"formik": "^2.1.4",
"i18n-iso-countries": "^6.8.0",
"js-cookie": "^2.2.1",
"mobx": "^5.15.7",
"mobx-react": "6.3.1",
"onfido-sdk-ui": "6.3.0",
"prop-types": "^15.7.2",
"qrcode.react": "^1.0.0",
"react": "^16.14.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0"
},
"devDependencies": {
"@jest/globals": "^26.5.3",
"@testing-library/react": "^12.0.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.0.1",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-binary": "^1.0.2",
"eslint-config-prettier": "^7.2.0",
"eslint-formatter-pretty": "^4.0.0",
"eslint-import-resolver-webpack": "^0.13.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"history": "^5.0.0",
"jest": "^26.4.2",
"mini-css-extract-plugin": "^1.3.4",
"node-sass": "^4.12.0",
"css-minimizer-webpack-plugin": "^3.0.1",
"postcss-loader": "^6.1.1",
"postcss-preset-env": "^6.7.0",
"postcss-scss": "^4.0.0",
"resolve-url-loader": "^3.1.2",
"rimraf": "^3.0.2",
"sass-loader": "^10.1.1",
"sass-resources-loader": "^2.1.1",
"terser-webpack-plugin": "^5.1.1",
"webpack": "^5.46.0"
}
}
"name": "@deriv/account",
"private": true,
"version": "1.0.0",
"description": "Deriv account management module",
"author": "Deriv.com",
"homepage": "https://github.com/binary-com/deriv-app",
"license": "Apache-2.0",
"main": "dist/account/js/account.js",
"bugs": {
"url": "https://github.com/binary-com/deriv-app/issues"
},
"engines": {
"node": "^14.17.1"
},
"scripts": {
"start": "npm run test && npm run serve",
"serve": "echo \"Serving...\" && webpack --progress --watch --config \"./build/webpack.config.js\"",
"build": "f () { webpack --config \"./build/webpack.config.js\" --env base=$1;}; f",
"build:travis": "rimraf dist && webpack --config \"./build/webpack.config.js\" --mode=production",
"test": "echo \"No test specified\"",
"test:eslint": "eslint \"./src/**/*.?(js|jsx)\"",
"deploy": "echo \"No deploy specified\"",
"deploy:clean": "echo \"No deploy:clean specified\"",
"deploy:folder": "echo \"No deploy:folder specified\"",
"deploy:staging": "echo \"No deploy:staging specified\"",
"deploy:production": "echo \"No deploy:production specified\""
},
"dependencies": {
"@binary-com/binary-document-uploader": "github:binary-com/binary-document-uploader",
"@deriv/components": "^1.0.0",
"@deriv/shared": "^1.0.0",
"@deriv/translations": "^1.0.0",
"bowser": "^2.9.0",
"classnames": "^2.2.6",
"formik": "^2.1.4",
"i18n-iso-countries": "^6.8.0",
"js-cookie": "^2.2.1",
"mobx": "6.5.0",
"mobx-react": "7.3.0",
"onfido-sdk-ui": "6.3.0",
"prop-types": "^15.7.2",
"qrcode.react": "^1.0.0",
"react": "^16.14.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0"
},
"devDependencies": {
"@jest/globals": "^26.5.3",
"@testing-library/react": "^12.0.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.0.1",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-binary": "^1.0.2",
"eslint-config-prettier": "^7.2.0",
"eslint-formatter-pretty": "^4.0.0",
"eslint-import-resolver-webpack": "^0.13.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"history": "^5.0.0",
"jest": "^26.4.2",
"mini-css-extract-plugin": "^1.3.4",
"node-sass": "^4.12.0",
"css-minimizer-webpack-plugin": "^3.0.1",
"postcss-loader": "^6.2.1",
"postcss-preset-env": "^7.4.3",
"postcss-scss": "^4.0.3",
"resolve-url-loader": "^3.1.2",
"rimraf": "^3.0.2",
"sass-loader": "^10.1.1",
"sass-resources-loader": "^2.1.1",
"terser-webpack-plugin": "^5.1.1",
"webpack": "^5.46.0"
}
}
9 changes: 6 additions & 3 deletions packages/account/src/Components/Routes/binary-link.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import { NavLink } from 'react-router-dom';
import { PlatformContext } from '@deriv/shared';
import getRoutesConfig from 'Constants/routes-config';
import { findRouteByPath, normalizePath } from './helpers';
import { connect } from 'Stores/connect';

const BinaryLink = ({ active_class, to, children, ...props }) => {
const BinaryLink = ({ active_class, to, children, is_social_signup, ...props }) => {
const { is_appstore } = React.useContext(PlatformContext);
const path = normalizePath(to);
const route = findRouteByPath(path, getRoutesConfig({ is_appstore }));
const route = findRouteByPath(path, getRoutesConfig({ is_appstore }, is_social_signup));

if (!route) {
throw new Error(`Route not found: ${to}`);
Expand All @@ -29,4 +30,6 @@ BinaryLink.propTypes = {
to: PropTypes.string,
};

export default BinaryLink;
export default connect(({ client }) => ({
is_social_signup: client.is_social_signup,
}))(BinaryLink);
9 changes: 6 additions & 3 deletions packages/account/src/Components/Routes/binary-routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { Switch } from 'react-router-dom';
import { Localize, PlatformContext } from '@deriv/shared';
import getRoutesConfig from 'Constants/routes-config';
import RouteWithSubRoutes from './route-with-sub-routes.jsx';
import { connect } from 'Stores/connect';

const BinaryRoutes = props => {
const { is_appstore } = React.useContext(PlatformContext);

const { is_social_signup } = props;
return (
<React.Suspense
fallback={() => {
Expand All @@ -18,12 +19,14 @@ const BinaryRoutes = props => {
}}
>
<Switch>
{getRoutesConfig({ is_appstore }).map((route, idx) => (
{getRoutesConfig({ is_appstore }, is_social_signup).map((route, idx) => (
<RouteWithSubRoutes key={idx} {...route} {...props} />
))}
</Switch>
</React.Suspense>
);
};

export default BinaryRoutes;
export default connect(({ client }) => ({
is_social_signup: client.is_social_signup,
}))(BinaryRoutes);
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
import PropTypes from 'prop-types';
import * as React from 'react';
import { StaticUrl } from '@deriv/components';
import { Localize, localize } from '@deriv/translations';
import AccountArticle from 'Components/article/article.jsx';

const AccountLimitsArticle = () => {
return (
<AccountArticle
title={localize('Account limits')}
descriptions={[
<Localize key={0} i18n_default_text='These are default limits that we apply to your accounts.' />,
const AccountLimitsArticle = ({ is_from_derivgo }) => {
const getDescription = () => {
const description = [
<Localize key={0} i18n_default_text='These are default limits that we apply to your accounts.' />,
];

if (!is_from_derivgo) {
description.push(
<Localize
key={1}
i18n_default_text='To learn more about trading limits and how they apply, please go to the <0>Help Centre.</0>'
components={[<StaticUrl key={0} className='link' href='/help-centre/trading/#trading-limits' />]}
/>,
]}
/>
);
/>
);
}
return description;
};

return <AccountArticle title={localize('Account limits')} descriptions={getDescription()} />;
};

AccountLimitsArticle.propTypes = {
is_from_derivgo: PropTypes.bool,
};

export default AccountLimitsArticle;
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const AccountLimits = ({
is_switching,
is_virtual,
overlay_ref,
is_from_derivgo,
setIsOverlayShown: setIsPopupOverlayShown,
should_bypass_scrollbars,
should_show_article,
Expand Down Expand Up @@ -116,7 +117,7 @@ const AccountLimits = ({
'da-account-limits--app-settings': is_app_settings,
})}
>
{should_show_article && isMobile() && <AccountLimitsArticle />}
{should_show_article && isMobile() && <AccountLimitsArticle is_from_derivgo={is_from_derivgo} />}
<div className='da-account-limits__table-wrapper'>
<ThemedScrollbars is_bypassed={should_bypass_scrollbars || isMobile()}>
<table className='da-account-limits__table'>
Expand Down Expand Up @@ -343,6 +344,7 @@ AccountLimits.propTypes = {
is_app_settings: PropTypes.bool,
getLimits: PropTypes.func.isRequired,
is_fully_authenticated: PropTypes.bool.isRequired,
is_from_derivgo: PropTypes.bool,
is_switching: PropTypes.bool.isRequired,
is_virtual: PropTypes.bool.isRequired,
overlay_ref: PropTypes.shape({ current: PropTypes.any }),
Expand Down
Loading