From 0cc795cd9d0c2e06b212acf1c7cdf05e32fa58fb Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Thu, 2 May 2024 12:54:17 -0700 Subject: [PATCH] Include newline character in Socket request messages New-line characters are a required delimiter for ElectrumX JSON-RPC messages. This will not impact Blockbook messages; it's backwards compatible. --- src/common/utxobased/network/Socket.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/utxobased/network/Socket.ts b/src/common/utxobased/network/Socket.ts index 53da9d77..01facc4b 100644 --- a/src/common/utxobased/network/Socket.ts +++ b/src/common/utxobased/network/Socket.ts @@ -252,7 +252,7 @@ export function makeSocket(uri: string, config: SocketConfig): Socket { method: request.task.method, params: request.task.params ?? {} } - socket.send(JSON.stringify(message)) + socket.send(JSON.stringify(message) + '\n') } }