diff --git a/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx b/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx index 7a9782c3..8325d93e 100644 --- a/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx +++ b/frontend/src/components/TradeBox/EncryptedChat/EncryptedSocketChat/index.tsx @@ -105,7 +105,6 @@ const EncryptedSocketChat: React.FC = ({ connection.send({ message: robot.pubKey, nick: userNick, - authorization: `Token ${robot.tokenSHA256}`, }); connection.onMessage((message) => setServerMessages((prev) => [...prev, message])); @@ -142,7 +141,6 @@ const EncryptedSocketChat: React.FC = ({ connection.send({ message: `-----SERVE HISTORY-----`, nick: userNick, - authorization: `Token ${robot.tokenSHA256}`, }); } // If we receive an encrypted message @@ -214,7 +212,6 @@ const EncryptedSocketChat: React.FC = ({ connection.send({ message: value, nick: userNick, - authorization: `Token ${robot.tokenSHA256}`, }); setValue(''); } @@ -230,7 +227,6 @@ const EncryptedSocketChat: React.FC = ({ connection.send({ message: encryptedMessage.toString().split('\n').join('\\'), nick: userNick, - authorization: `Token ${robot.tokenSHA256}`, }); } }) diff --git a/frontend/src/contexts/AppContext.ts b/frontend/src/contexts/AppContext.ts index d6be350f..cf082170 100644 --- a/frontend/src/contexts/AppContext.ts +++ b/frontend/src/contexts/AppContext.ts @@ -276,7 +276,7 @@ export const useAppStore = () => { }, [delay, currentOrder, page, badOrder]); const orderReceived = function (data: any) { - if (data.bad_request != undefined) { + if (data.bad_request) { setBadOrder(data.bad_request); setDelay(99999999); setOrder(undefined); diff --git a/frontend/src/services/Websocket/WebsocketConnectionWeb/index.ts b/frontend/src/services/Websocket/WebsocketConnectionWeb/index.ts index fb70cf5b..831e0be8 100644 --- a/frontend/src/services/Websocket/WebsocketConnectionWeb/index.ts +++ b/frontend/src/services/Websocket/WebsocketConnectionWeb/index.ts @@ -3,7 +3,12 @@ import { WebsocketConnection } from '..'; class WebsocketConnectionWeb implements WebsocketConnection { constructor(path: string) { - this.rws = new ReconnectingWebSocket(path, [], { connectionTimeout: 15000 }); + this.rws = new ReconnectingWebSocket(path, [], { + connectionTimeout: 15000, + reconnectionDelayGrowFactor: 1.5, + maxRetries: 15, + maxReconnectionDelay: 1000000, + }); } public rws: ReconnectingWebSocket; diff --git a/robosats/middleware.py b/robosats/middleware.py index ec5caae9..fb13a280 100644 --- a/robosats/middleware.py +++ b/robosats/middleware.py @@ -160,7 +160,6 @@ class TokenAuthMiddleware(BaseMiddleware): dict((x.split("=") for x in scope["query_string"].decode().split("&"))) ).get("token_sha256_hex", None) token_key = hex_to_base91(token_key) - print(token_key) except ValueError: token_key = None scope["user"] = (