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

Shayan/74387/Update TS Config and Fix TS Errors on Cashier #6284

Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
613e011
checking circle/ci test
Jul 11, 2022
2dc542b
removed test changes
Jul 11, 2022
3088a3b
Merge branch 'binary-com:master' into master
shayan-deriv Jul 12, 2022
321e537
Merge branch 'binary-com:master' into master
shayan-deriv Jul 13, 2022
38dfce8
Merge branch 'master' of https://github.com/binary-com/deriv-app
Jul 13, 2022
21a7c64
Merge branch 'binary-com:master' into master
shayan-deriv Jul 19, 2022
cbf5de9
Merge branch 'binary-com:master' into master
shayan-deriv Jul 21, 2022
6882b1d
Merge branch 'binary-com:master' into master
shayan-deriv Jul 21, 2022
c800916
Merge branch 'binary-com:master' into master
shayan-deriv Jul 21, 2022
af4c871
Merge branch 'master' of https://github.com/binary-com/deriv-app
Jul 25, 2022
d4fedbe
Merge branch 'master' of github.com:iman-fs/deriv-app
Jul 25, 2022
308df7c
Merge branch 'master' of https://github.com/binary-com/deriv-app
Jul 26, 2022
06d8d2a
Merge branch 'binary-com:master' into master
shayan-deriv Jul 28, 2022
9564888
Merge branch 'binary-com:master' into master
shayan-deriv Jul 28, 2022
d217eb4
Merge branch 'binary-com:master' into master
shayan-deriv Aug 2, 2022
cf021d2
Merge branch 'master' of https://github.com/binary-com/deriv-app
Aug 2, 2022
45c53ac
Merge branch 'master' of github.com:iman-fs/deriv-app
Aug 2, 2022
fcfc904
Merge branch 'binary-com:master' into master
shayan-deriv Aug 3, 2022
77a5aab
Merge branch 'master' of https://github.com/binary-com/deriv-app
Aug 4, 2022
8713764
Merge branch 'binary-com:master' into master
shayan-deriv Aug 4, 2022
8de30bd
Merge branch 'binary-com:master' into master
shayan-deriv Aug 5, 2022
f958136
Merge branch 'master' of github.com:iman-fs/deriv-app
Aug 9, 2022
d8fa7bf
Merge branch 'master' of https://github.com/binary-com/deriv-app
Aug 9, 2022
6887da9
Merge branch 'master' of https://github.com/binary-com/deriv-app
Aug 10, 2022
bf61789
Merge branch 'binary-com:master' into master
shayan-deriv Aug 10, 2022
9d2a8f3
Merge branch 'binary-com:master' into master
shayan-deriv Aug 14, 2022
d1a7e49
Merge branch 'master' of https://github.com/binary-com/deriv-app
Aug 15, 2022
6b38944
Merge branch 'binary-com:master' into master
shayan-deriv Aug 17, 2022
0f24d87
Merge branch 'binary-com:master' into master
shayan-deriv Aug 22, 2022
0a7019d
Merge branch 'binary-com:master' into master
shayan-deriv Aug 22, 2022
064fa80
Merge branch 'master' of github.com:binary-com/deriv-app
Aug 23, 2022
fc06876
Merge branch 'binary-com:master' into master
shayan-deriv Aug 24, 2022
2067ed0
fix: updated ts config and fixed two errors returnd by tsc
Aug 25, 2022
531c6fd
Merge branch 'binary-com:master' into shayan/74387/fix-ts-config-on-c…
shayan-deriv Aug 28, 2022
610fc13
Merge branch 'binary-com:master' into shayan/74387/fix-ts-config-on-c…
shayan-deriv Aug 31, 2022
ab272b6
fix: fixing errors returned by tsc (WIP)
Aug 31, 2022
14e0768
fix: fixed all ts errors
Aug 31, 2022
8850eb0
chore: removed experimentalDecorators from tsconfig
Aug 31, 2022
b105f29
fix: removed unnecessary path from tsconfig
Sep 1, 2022
45a3e7c
Merge branch 'binary-com:master' into shayan/74387/fix-ts-config-on-c…
shayan-deriv Sep 4, 2022
9429b3a
Merge branch 'master' of github.com:binary-com/deriv-app into shayan/…
Sep 7, 2022
9dbc25a
Merge branch 'master' into shayan/74387/fix-ts-config-on-cashier
shayan-deriv Sep 7, 2022
0b660c7
Merge branch 'binary-com:master' into shayan/74387/fix-ts-config-on-c…
shayan-deriv Sep 12, 2022
ef08160
fix: type added to transfer_to_hint
Sep 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/cashier/globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
declare module '@deriv/components';
shayan-deriv marked this conversation as resolved.
Show resolved Hide resolved
declare module '@deriv/p2p';
declare module '@deriv/translations';
declare module '@deriv/shared';
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const CashierLocked = ({
const ask_uk_funds_protection = cashier_validation?.includes('ASK_UK_FUNDS_PROTECTION');
let icon = 'IcCashierLocked';
let title = localize('Cashier is locked');
let message = localize(
let message: string | JSX.Element = localize(
'Your cashier is currently locked. Please contact us via live chat to find out how to unlock it.'
);

Expand Down
14 changes: 7 additions & 7 deletions packages/cashier/src/components/error-dialog/error-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ const ErrorDialog = ({ disableApp, enableApp, error = {} }: TErrorDialogProps) =
message: '',
});

const dismissError = React.useCallback(() => {
if (error.setErrorMessage) {
error.setErrorMessage('');
}
setErrorVisibility(false);
}, [error]);

Copy link
Member Author

Choose a reason for hiding this comment

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

moved dismissError here because it should be assigned before being used

const mapErrorToDetails = React.useCallback(
(error_code?: string, error_message?: string) => {
if (
Expand Down Expand Up @@ -118,13 +125,6 @@ const ErrorDialog = ({ disableApp, enableApp, error = {} }: TErrorDialogProps) =
setIsVisible(is_error_visible);
};

const dismissError = React.useCallback(() => {
if (error.setErrorMessage) {
error.setErrorMessage('');
}
setErrorVisibility(false);
}, [error]);

return (
<Dialog
title={details.title}
Expand Down
24 changes: 12 additions & 12 deletions packages/cashier/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"paths": {
"Components/*": ["components/*"],
"Config/*": ["config/*"],
"Constants/*":["constants/*"],
"Containers/*": ["containers/*"],
"Images/*": ["public/images/*"],
"Pages/*": ["pages/*"],
"Stores/*": ["stores/*"],
"Types": ["types"],
"Utils/*": ["utils/*"],
"Components/*": ["src/components/*"],
"Config/*": ["src/config/*"],
"Constants/*": ["src/constants/*"],
"Containers/*": ["src/containers/*"],
"Images/*": ["src/public/images/*"],
shayan-deriv marked this conversation as resolved.
Show resolved Hide resolved
"Pages/*": ["src/pages/*"],
"Stores/*": ["src/stores/*"],
"Types": ["src/types"],
"Utils/*": ["src/utils/*"],
"@deriv/*": ["../*/src"]
},
"outDir": "./dist",
"rootDir": "./src",
"baseUrl": "src",
"baseUrl": "./"
},
"include": ["./src", "./src/**/*.ts", "./src/**/*.tsx", "globals.d.ts"]
"include": ["src", "globals.d.ts"]
}
3 changes: 2 additions & 1 deletion packages/components/src/components/fade-wrapper/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './fade-wrapper.scss';
import FadeWrapper from './fade-wrapper.jsx';

export default from './fade-wrapper.jsx';
export default FadeWrapper;
3 changes: 2 additions & 1 deletion packages/components/src/components/icon-trade-types/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './icon-trade-types.scss';
import IconTradeTypes from './icon-trade-types.jsx';

export default from './icon-trade-types.jsx';
export default IconTradeTypes;