From 237331c67fafc0f83546ca944d47b6d5718b5ec9 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Tue, 17 Dec 2024 11:51:18 +0100 Subject: [PATCH] Minor fixes in websockets.ts --- src/websockets.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/websockets.ts b/src/websockets.ts index b4e7eba..174de26 100755 --- a/src/websockets.ts +++ b/src/websockets.ts @@ -26,7 +26,6 @@ export async function initWebsocket(url: string) { (async () => { if (typeof msgData === 'string') { try { - const feeRate = 0.0001; const parsedMessage = JSON.parse(msgData); const services = await Services.getInstance(); switch (parsedMessage.flag) { @@ -65,7 +64,7 @@ export function sendMessage(flag: AnkFlag, message: string): void { flag: flag, content: message, }; - console.log('Sending message:', JSON.stringify(networkMessage)); + console.log('Sending message of type:', flag); ws.send(JSON.stringify(networkMessage)); } else { console.error('WebSocket is not open. ReadyState:', ws.readyState); @@ -77,11 +76,6 @@ export function getUrl(): string { return ws.url; } -export function sendNormalMessage(message: string) { - ws.send(message); - console.log('Sending message:', JSON.stringify(message)); -} - // Method to close the WebSocket connection export function close(): void { ws.close();