diff --git a/frontend/src/pro/Widgets/Book.tsx b/frontend/src/pro/Widgets/Book.tsx
index 09691263..7c2328bb 100644
--- a/frontend/src/pro/Widgets/Book.tsx
+++ b/frontend/src/pro/Widgets/Book.tsx
@@ -1,7 +1,8 @@
-import React from 'react';
+import React, { useContext } from 'react';
+import { AppContext, AppContextProps } from '../../contexts/AppContext';
import { Book, Favorites } from '../../models';
-import { Paper, useTheme } from '@mui/material';
+import { Paper } from '@mui/material';
import BookTable from '../../components/BookTable';
interface BookWidgetProps {
@@ -24,13 +25,7 @@ const BookWidget = React.forwardRef(
(
{
layout,
- baseUrl,
gridCellSize = 2,
- book,
- fetchBook,
- fav,
- setFav,
- windowSize,
style,
className,
onMouseDown,
@@ -39,24 +34,18 @@ const BookWidget = React.forwardRef(
}: BookWidgetProps,
ref,
) => {
- const theme = useTheme();
+ const { book, windowSize, fav } = useContext
(AppContext);
return React.useMemo(() => {
return (
fetchBook()}
- book={book}
- fav={fav}
fillContainer={true}
maxWidth={layout.w * gridCellSize} // EM units
maxHeight={layout.h * gridCellSize} // EM units
fullWidth={windowSize.width} // EM units
fullHeight={windowSize.height} // EM units
defaultFullscreen={false}
- onCurrencyChange={(e) => setFav({ ...fav, currency: e.target.value })}
- onTypeChange={(mouseEvent, val) => setFav({ ...fav, type: val })}
/>
);
diff --git a/frontend/src/pro/Widgets/Depth.tsx b/frontend/src/pro/Widgets/Depth.tsx
index 518139c0..81af2ef1 100644
--- a/frontend/src/pro/Widgets/Depth.tsx
+++ b/frontend/src/pro/Widgets/Depth.tsx
@@ -1,22 +1,16 @@
-import React from 'react';
-
-import { Order, LimitList } from '../../models';
+import React, { useContext } from 'react';
+import { AppContext, AppContextProps } from '../../contexts/AppContext';
import { Paper, useTheme } from '@mui/material';
import DepthChart from '../../components/Charts/DepthChart';
interface DepthChartWidgetProps {
layout: any;
gridCellSize: number;
- orders: PublicOrder[];
- currency: number;
- limitList: LimitList;
- windowSize: { width: number; height: number };
style?: Object;
className?: string;
onMouseDown?: () => void;
onMouseUp?: () => void;
onTouchEnd?: () => void;
- baseUrl: string;
}
const DepthChartWidget = React.forwardRef(
@@ -24,11 +18,6 @@ const DepthChartWidget = React.forwardRef(
{
layout,
gridCellSize,
- limitList,
- orders,
- baseUrl,
- currency,
- windowSize,
style,
className,
onMouseDown,
@@ -38,22 +27,19 @@ const DepthChartWidget = React.forwardRef(
ref,
) => {
const theme = useTheme();
+ const { fav, book, limits } = useContext(AppContext);
return React.useMemo(() => {
return (
);
- }, [currency, orders, limitList, layout]);
+ }, [fav.currency, book, limits, layout]);
},
);
diff --git a/frontend/src/pro/Widgets/Maker.tsx b/frontend/src/pro/Widgets/Maker.tsx
index 9ecbf39d..ee36f7fc 100644
--- a/frontend/src/pro/Widgets/Maker.tsx
+++ b/frontend/src/pro/Widgets/Maker.tsx
@@ -1,17 +1,11 @@
-import React from 'react';
+import React, { useContext } from 'react';
+import { AppContext, AppContextProps } from '../../contexts/AppContext';
import MakerForm from '../../components/MakerForm';
import { LimitList, Maker, Favorites } from '../../models';
import { Paper } from '@mui/material';
interface MakerWidgetProps {
- limits: { list: LimitList; loading: boolean };
- fetchLimits: () => void;
- fav: Favorites;
- maker: Maker;
- setFav: (state: Favorites) => void;
- setMaker: (state: Maker) => void;
- baseUrl: string;
style?: Object;
className?: string;
onMouseDown?: () => void;
@@ -20,38 +14,15 @@ interface MakerWidgetProps {
}
const MakerWidget = React.forwardRef(
- (
- {
- maker,
- setMaker,
- limits,
- fetchLimits,
- fav,
- setFav,
- baseUrl,
- style,
- className,
- onMouseDown,
- onMouseUp,
- onTouchEnd,
- }: MakerWidgetProps,
- ref,
- ) => {
+ ({ style, className, onMouseDown, onMouseUp, onTouchEnd }: MakerWidgetProps, ref) => {
+ const { maker, fav, limits } = useContext(AppContext);
return React.useMemo(() => {
return (
-
+
);
}, [maker, limits, fav]);
diff --git a/frontend/src/pro/Widgets/Settings.tsx b/frontend/src/pro/Widgets/Settings.tsx
index 7d5bd55f..e739d77e 100644
--- a/frontend/src/pro/Widgets/Settings.tsx
+++ b/frontend/src/pro/Widgets/Settings.tsx
@@ -1,12 +1,10 @@
-import React from 'react';
-
+import React, { useContext } from 'react';
+import { AppContextProps, AppContext } from '../../contexts/AppContext';
import { Settings } from '../../models';
-import { Paper, useTheme } from '@mui/material';
+import { Paper } from '@mui/material';
import SettingsForm from '../../components/SettingsForm';
interface SettingsWidgetProps {
- settings: Settings;
- setSettings: (state: Settings) => void;
style?: Object;
className?: string;
onMouseDown?: () => void;
@@ -15,26 +13,15 @@ interface SettingsWidgetProps {
}
const SettingsWidget = React.forwardRef(
- (
- {
- settings,
- setSettings,
- style,
- className,
- onMouseDown,
- onMouseUp,
- onTouchEnd,
- }: SettingsWidgetProps,
- ref,
- ) => {
- const theme = useTheme();
+ ({ style, className, onMouseDown, onMouseUp, onTouchEnd }: SettingsWidgetProps, ref) => {
+ const { settings } = useContext(AppContext);
return React.useMemo(() => {
return (
-
+
);
}, [settings]);
diff --git a/frontend/static/locales/ca.json b/frontend/static/locales/ca.json
index 561acb9e..a2021785 100644
--- a/frontend/static/locales/ca.json
+++ b/frontend/static/locales/ca.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connexió xifrada i anònima mitjançant TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "Això garanteix la màxima privadesa, però és possible que sentis que l'aplicació es comporta lenta. Si es perd la connexió, reinicia l'aplicació.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Si us plau, introdueix el teu token per reconstruir el teu robot i accedir a les seves operacions.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Introdueix el teu token per reconstruir el teu robot i accedir a les seves operacions.",
"Paste token here": "Enganxa el token aquí",
"Recover": "Recuperar",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/cs.json b/frontend/static/locales/cs.json
index 7d60610f..1bef85f8 100644
--- a/frontend/static/locales/cs.json
+++ b/frontend/static/locales/cs.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/de.json b/frontend/static/locales/de.json
index 66c2efb2..b7eaca36 100644
--- a/frontend/static/locales/de.json
+++ b/frontend/static/locales/de.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/en.json b/frontend/static/locales/en.json
index c41ac091..f8ceedd3 100644
--- a/frontend/static/locales/en.json
+++ b/frontend/static/locales/en.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/es.json b/frontend/static/locales/es.json
index b2519c16..4d9e0217 100644
--- a/frontend/static/locales/es.json
+++ b/frontend/static/locales/es.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/eu.json b/frontend/static/locales/eu.json
index 3cac6489..3295f206 100644
--- a/frontend/static/locales/eu.json
+++ b/frontend/static/locales/eu.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/fr.json b/frontend/static/locales/fr.json
index 26a11a65..63624964 100644
--- a/frontend/static/locales/fr.json
+++ b/frontend/static/locales/fr.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/it.json b/frontend/static/locales/it.json
index 5bf2949f..518597ce 100644
--- a/frontend/static/locales/it.json
+++ b/frontend/static/locales/it.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/pl.json b/frontend/static/locales/pl.json
index 85604cc0..be41bfce 100644
--- a/frontend/static/locales/pl.json
+++ b/frontend/static/locales/pl.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/pt.json b/frontend/static/locales/pt.json
index 13e33066..a85e8cf6 100644
--- a/frontend/static/locales/pt.json
+++ b/frontend/static/locales/pt.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/ru.json b/frontend/static/locales/ru.json
index bb85e95f..b6823ebc 100644
--- a/frontend/static/locales/ru.json
+++ b/frontend/static/locales/ru.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/sv.json b/frontend/static/locales/sv.json
index ca3187c3..43b40791 100644
--- a/frontend/static/locales/sv.json
+++ b/frontend/static/locales/sv.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/th.json b/frontend/static/locales/th.json
index a66f29b6..d485f37a 100644
--- a/frontend/static/locales/th.json
+++ b/frontend/static/locales/th.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/zh-SI.json b/frontend/static/locales/zh-SI.json
index f5dfb315..2424d2a2 100644
--- a/frontend/static/locales/zh-SI.json
+++ b/frontend/static/locales/zh-SI.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",
diff --git a/frontend/static/locales/zh-TR.json b/frontend/static/locales/zh-TR.json
index 7d7ef680..48d47a1c 100644
--- a/frontend/static/locales/zh-TR.json
+++ b/frontend/static/locales/zh-TR.json
@@ -41,7 +41,8 @@
"Connection encrypted and anonymized using TOR.": "Connection encrypted and anonymized using TOR.",
"This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.": "This ensures maximum privacy, however you might feel the app behaves slow. If connection is lost, restart the app.",
"#7": "Phrases in basic/RobotPage/Recovery.tsx",
- "Please, introduce your robot token to re-build your robot and gain access to its trades.": "Please, introduce your robot token to re-build your robot and gain access to its trades.",
+ "Robot recovery": "Robot recovery",
+ "Enter your robot token to re-build your robot and gain access to its trades.": "Enter your robot token to re-build your robot and gain access to its trades.",
"Paste token here": "Paste token here",
"Recover": "Recover",
"#8": "Phrases in basic/RobotPage/Welcome.tsx",