This commit is contained in:
Sacha Weatherstone
2021-10-24 22:15:22 +11:00
parent 1cffbab98d
commit 8a9c0a268a
14 changed files with 739 additions and 349 deletions
+1 -11
View File
@@ -10,7 +10,6 @@ import { Navigation } from '@components/menu/Navigation';
import { connection } from '@core/connection';
import { useRoute } from '@core/router';
import {
ackMessage,
addChannel,
addMessage,
addNode,
@@ -52,10 +51,9 @@ const App = (): JSX.Element => {
SettingsManager.debugMode = Protobuf.LogRecord_Level.TRACE;
void connection.connect({
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
address: connectionURL,
receiveBatchRequests: false,
tls: false,
receiveBatchRequests: false,
fetchInterval: 2000,
});
}, [hostOverrideEnabled, hostOverride, connectionURL]);
@@ -116,14 +114,6 @@ const App = (): JSX.Element => {
);
});
connection.onRoutingPacket.subscribe((routingPacket) => {
if (routingPacket.packet.payloadVariant.oneofKind === 'decoded') {
dispatch(
ackMessage(routingPacket.packet.payloadVariant.decoded.requestId),
);
}
});
return (): void => {
connection.onDeviceStatus.cancelAll();
connection.onMyNodeInfo.cancelAll();