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();