mirror of
https://github.com/RoboSats/robosats.git
synced 2025-02-20 20:29:02 +00:00
Fix loading robots (#1166)
* Fix loading Robot orders * remove logs * feat: move looking for orders loading bar --------- Co-authored-by: KoalaSat <yv1vtrul@duck.com>
This commit is contained in:
parent
2d927249cd
commit
e26435f4f3
@ -75,6 +75,10 @@ const RobotProfile = ({
|
||||
const slot = garage.getSlot();
|
||||
const robot = slot?.getRobot();
|
||||
|
||||
const loadingCoordinators = Object.values(slot?.robots ?? {}).filter(
|
||||
(robot) => robot.loading,
|
||||
).length;
|
||||
|
||||
return (
|
||||
<Grid container direction='column' alignItems='center' spacing={1} padding={1} paddingTop={2}>
|
||||
<Grid
|
||||
@ -150,6 +154,13 @@ const RobotProfile = ({
|
||||
)}
|
||||
</Grid>
|
||||
|
||||
{loadingCoordinators > 0 ? (
|
||||
<Grid>
|
||||
<b>{t('Looking for orders!')}</b>
|
||||
<LinearProgress />
|
||||
</Grid>
|
||||
) : null}
|
||||
|
||||
{Boolean(robot?.activeOrderId) && Boolean(slot?.hashId) ? (
|
||||
<Grid item>
|
||||
<Button
|
||||
@ -197,6 +208,13 @@ const RobotProfile = ({
|
||||
</Grid>
|
||||
) : null}
|
||||
|
||||
{!Boolean(robot?.activeOrderId) &&
|
||||
slot?.hashId &&
|
||||
!Boolean(robot?.lastOrderId) &&
|
||||
loadingCoordinators === 0 ? (
|
||||
<Grid item>{t('No existing orders found')}</Grid>
|
||||
) : null}
|
||||
|
||||
<Grid
|
||||
item
|
||||
container
|
||||
|
@ -324,6 +324,8 @@ export class Coordinator {
|
||||
|
||||
if (!hasEnoughEntropy) return null;
|
||||
|
||||
garage.updateRobot(token, this.shortAlias, { loading: true });
|
||||
|
||||
const newAttributes = await apiClient
|
||||
.get(this.url, `${this.basePath}/api/robot/`, authHeaders)
|
||||
.then((data: any) => {
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Esborrar Garatge",
|
||||
"Last order #{{orderID}}": "Última ordre #{{orderID}}",
|
||||
"Logout": "Sortir",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "La reutilització de la identitat de trading degrada la teva privadesa davant d'altres usuaris, coordinadors i observadors.",
|
||||
"Robot Garage": "Garatge de Robots",
|
||||
"Store your token safely": "Guarda el teu token de manera segura",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Delete Garage",
|
||||
"Last order #{{orderID}}": "Last order #{{orderID}}",
|
||||
"Logout": "Logout",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Reusing trading identity degrades your privacy against other users, coordinators and observers.",
|
||||
"Robot Garage": "Robot Garage",
|
||||
"Store your token safely": "Ulož si svůj token bezpečně",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Delete Garage",
|
||||
"Last order #{{orderID}}": "Last order #{{orderID}}",
|
||||
"Logout": "Logout",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Reusing trading identity degrades your privacy against other users, coordinators and observers.",
|
||||
"Robot Garage": "Robot Garage",
|
||||
"Store your token safely": "Verwahre deinen Token sicher",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Delete Garage",
|
||||
"Last order #{{orderID}}": "Last order #{{orderID}}",
|
||||
"Logout": "Logout",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Reusing trading identity degrades your privacy against other users, coordinators and observers.",
|
||||
"Robot Garage": "Robot Garage",
|
||||
"Store your token safely": "Store your token safely",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Borrar Garaje",
|
||||
"Last order #{{orderID}}": "Última orden #{{orderID}}",
|
||||
"Logout": "Cerrar sesión",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Reutilizar una identidad debilita su privacidad frente a otros usarios, coordinadores y observadores.",
|
||||
"Robot Garage": "Garaje de robots",
|
||||
"Store your token safely": "Guarda tu token de forma segura",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Delete Garage",
|
||||
"Last order #{{orderID}}": "Last order #{{orderID}}",
|
||||
"Logout": "Logout",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Reusing trading identity degrades your privacy against other users, coordinators and observers.",
|
||||
"Robot Garage": "Robot Garage",
|
||||
"Store your token safely": "Gorde zure tokena era seguru batean",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Suppression du garage",
|
||||
"Last order #{{orderID}}": "Dernier ordre #{{orderID}}",
|
||||
"Logout": "Déconnexion",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "La réutilisation de l'identité d'échange dégrade votre vie privée par rapport aux autres utilisateurs, coordinateurs et observateurs.",
|
||||
"Robot Garage": "Garage des robots",
|
||||
"Store your token safely": "Stockez votre jeton en sécurité",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Cancella Garage",
|
||||
"Last order #{{orderID}}": "Ultimo ordine #{{orderID}}",
|
||||
"Logout": "Esci",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Il riutilizzo di identità per gli scambi riduce la privacy rispetto ad altri utenti, coordinatori e osservatori.",
|
||||
"Robot Garage": "Garage del robot",
|
||||
"Store your token safely": "Custodisci il tuo token in modo sicuro",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "ガレージを空にする",
|
||||
"Last order #{{orderID}}": "直前の注文 #{{orderID}}",
|
||||
"Logout": "ログアウト",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "同一の身元を再利用することは、他のユーザー、管理者、観察者に対してプライバシーを弱める可能性があります。",
|
||||
"Robot Garage": "ロボットガレージ",
|
||||
"Store your token safely": "安全にトークンを保存してください。",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Delete Garage",
|
||||
"Last order #{{orderID}}": "Last order #{{orderID}}",
|
||||
"Logout": "Logout",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Reusing trading identity degrades your privacy against other users, coordinators and observers.",
|
||||
"Robot Garage": "Robot Garage",
|
||||
"Store your token safely": "Przechowuj swój token bezpiecznie",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Delete Garage",
|
||||
"Last order #{{orderID}}": "Last order #{{orderID}}",
|
||||
"Logout": "Logout",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Reusing trading identity degrades your privacy against other users, coordinators and observers.",
|
||||
"Robot Garage": "Robot Garage",
|
||||
"Store your token safely": "Guarde seu token de forma segura",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Удалить гараж",
|
||||
"Last order #{{orderID}}": "Последний ордер #{{orderID}}",
|
||||
"Logout": "Выйти",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Повторное использование торговых данных ухудшает вашу конфиденциальность по отношению к другим пользователям, координаторам и наблюдателям.",
|
||||
"Robot Garage": "Гараж роботов",
|
||||
"Store your token safely": "Храните Ваш токен в безопасности",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Delete Garage",
|
||||
"Last order #{{orderID}}": "Last order #{{orderID}}",
|
||||
"Logout": "Logout",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Reusing trading identity degrades your privacy against other users, coordinators and observers.",
|
||||
"Robot Garage": "Robot Garage",
|
||||
"Store your token safely": "Spara din token säkert",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Futa Ghorofa",
|
||||
"Last order #{{orderID}}": "Amri ya mwisho #{{orderID}}",
|
||||
"Logout": "Toka",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Kutumia tena utambulisho wa biashara hupunguza faragha yako dhidi ya watumiaji wengine, waongozaji na waangalizi.",
|
||||
"Robot Garage": "Gorofa ya Roboti",
|
||||
"Store your token safely": "Hifadhi alama yako kwa usalama",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "Delete Garage",
|
||||
"Last order #{{orderID}}": "Last order #{{orderID}}",
|
||||
"Logout": "Logout",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "Reusing trading identity degrades your privacy against other users, coordinators and observers.",
|
||||
"Robot Garage": "Robot Garage",
|
||||
"Store your token safely": "รักษา token ของคุณไว้ให้ดี",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "删除仓库",
|
||||
"Last order #{{orderID}}": "上一张订单 #{{orderID}}",
|
||||
"Logout": "登出",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "重复使用交易身份会降低你相对其他用户、协调器和观察者的隐私。",
|
||||
"Robot Garage": "机器人仓库",
|
||||
"Store your token safely": "请安全地存储你的令牌",
|
||||
|
@ -53,6 +53,8 @@
|
||||
"Delete Garage": "刪除倉庫",
|
||||
"Last order #{{orderID}}": "上一張訂單 #{{orderID}}",
|
||||
"Logout": "登出",
|
||||
"Looking for orders!": "Looking for orders!",
|
||||
"No existing orders found": "No existing orders found",
|
||||
"Reusing trading identity degrades your privacy against other users, coordinators and observers.": "重複使用交易身份會降低你對其他用戶、協調器和觀察者的隱私。",
|
||||
"Robot Garage": "機器人倉庫",
|
||||
"Store your token safely": "請安全地存儲你的令牌",
|
||||
|
Loading…
Reference in New Issue
Block a user