Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into Vinu/20696747/add…
Browse files Browse the repository at this point in the history
…ition-of-env-for-google-api
  • Loading branch information
vinu-deriv committed Apr 12, 2023
2 parents 55a012f + f12eb13 commit b1972ce
Show file tree
Hide file tree
Showing 145 changed files with 68,505 additions and 38,712 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ module.exports = {
'import/prefer-default-export': 0,
'import/extensions': [0, { jsx: 'always', json: 'always' }],
'no-sequences': ['warn'],
'react/no-unknown-property': 1,
'import/no-unresolved': [2, { ignore: ['@deriv/components', '@deriv/shared'] }],

// react rules
Expand Down
82,827 changes: 45,312 additions & 37,515 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion packages/account/src/Containers/account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ const Account = ({
is_from_derivgo,
is_logged_in,
is_logging_in,
is_pending_proof_of_ownership,
is_virtual,
is_visible,
location,
Expand Down Expand Up @@ -156,7 +157,7 @@ const Account = ({
}

if (route.path === shared_routes.proof_of_ownership) {
route.is_disabled = is_virtual;
route.is_disabled = is_virtual || !is_pending_proof_of_ownership;
}
});
});
Expand Down Expand Up @@ -218,6 +219,7 @@ Account.propTypes = {
is_from_derivgo: PropTypes.bool,
is_logged_in: PropTypes.bool,
is_logging_in: PropTypes.bool,
is_pending_proof_of_ownership: PropTypes.bool,
is_virtual: PropTypes.bool,
is_visible: PropTypes.bool,
location: PropTypes.object,
Expand All @@ -235,6 +237,7 @@ export default connect(({ client, common, ui }) => ({
is_from_derivgo: common.is_from_derivgo,
is_logged_in: client.is_logged_in,
is_logging_in: client.is_logging_in,
is_pending_proof_of_ownership: client.is_pending_proof_of_ownership,
is_virtual: client.is_virtual,
is_visible: ui.is_account_settings_visible,
logout: client.logout,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Localize, localize } from '@deriv/translations';

const paymentMethodConfig = {
const getPaymentMethodsConfig = () => ({
advcash: {
icon_light: 'IcAdvcashLight',
icon_dark: 'IcAdvcashDark',
Expand Down Expand Up @@ -181,6 +181,6 @@ const paymentMethodConfig = {
input_label: null,
identifier_type: 'none',
},
};
});

export default paymentMethodConfig;
export default getPaymentMethodsConfig;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ProofOfOwnershipForm from './proof-of-ownership-form.jsx';
import { POONotRequired, POOVerified, POORejetced, POOSubmitted } from 'Components/poo/statuses';
import { Loading } from '@deriv/components';
import { POO_STATUSES } from './constants/constants';
import paymentMethodConfig from './payment-method-config.js';
import getPaymentMethodsConfig from './payment-method-config.js';

export const ProofOfOwnership = ({
account_status,
Expand All @@ -18,8 +18,10 @@ export const ProofOfOwnership = ({
const [status, setStatus] = useState(POO_STATUSES.none);
const grouped_payment_method_data = React.useMemo(() => {
const groups = {};
const payment_methods_config = getPaymentMethodsConfig();
cards?.forEach(card => {
const card_details = paymentMethodConfig[card.payment_method.toLowerCase()] || paymentMethodConfig.other;
const card_details =
payment_methods_config[card.payment_method.toLowerCase()] || payment_methods_config.other;
if (groups[card?.payment_method?.toLowerCase()]) {
groups[card?.payment_method?.toLowerCase()].items.push(card);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/account/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"@deriv/*": ["../*/src"]
}
},
"include": ["src", "globals.d.ts", "../../global.d.ts", "../../utils.d.ts"]
"include": ["src", "globals.d.ts"]
}
1 change: 0 additions & 1 deletion packages/bot-web-ui/src/components/flyout/flyout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ const Flyout = props => {
is_visible && (
<div
id='gtm-search-results'
gtm-search-term={search_term}
className={classNames('flyout', {
flyout__search: is_search_flyout,
flyout__help: is_help_content,
Expand Down
14 changes: 5 additions & 9 deletions packages/bot-web-ui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,11 @@ module.exports = function (env) {
},
plugins: [
new Dotenv(),
...(process.env.NODE_ENV !== 'development'
? []
: [
new DefinePlugin({
'process.env.GD_CLIENT_ID': JSON.stringify(process.env.GD_CLIENT_ID),
'process.env.GD_API_KEY': JSON.stringify(process.env.GD_API_KEY),
'process.env.GD_APP_ID': JSON.stringify(process.env.GD_APP_ID),
}),
]),
new DefinePlugin({
'process.env.GD_CLIENT_ID': JSON.stringify(process.env.GD_CLIENT_ID),
'process.env.GD_API_KEY': JSON.stringify(process.env.GD_API_KEY),
'process.env.GD_APP_ID': JSON.stringify(process.env.GD_APP_ID),
}),
new CleanWebpackPlugin(),
new MiniCssExtractPlugin({
filename: 'bot/css/bot.main.[contenthash].css',
Expand Down
Loading

0 comments on commit b1972ce

Please sign in to comment.