From ca8a5da9cfab20cded7070bd7b5b0377b556a4b8 Mon Sep 17 00:00:00 2001 From: Julian <52217955+julianmerlo95@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:25:01 -0300 Subject: [PATCH] [Blockchain Watcher] (FIX) Add content type header (#1114) * Add content type header * Remove rcp for arbitrum --------- Co-authored-by: julian merlo --- blockchain-watcher/config/mainnet.json | 6 +----- blockchain-watcher/package.json | 1 - .../src/infrastructure/rpc/http/InstrumentedHttpProvider.ts | 3 +++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/blockchain-watcher/config/mainnet.json b/blockchain-watcher/config/mainnet.json index 7748c7c8..a6f49a4c 100644 --- a/blockchain-watcher/config/mainnet.json +++ b/blockchain-watcher/config/mainnet.json @@ -80,11 +80,7 @@ }, "arbitrum": { "network": "mainnet", - "rpcs": [ - "https://arb1.arbitrum.io/rpc", - "https://arbitrum.blockpi.network/v1/rpc/public", - "https://arbitrum-one.public.blastapi.io" - ] + "rpcs": ["https://arb1.arbitrum.io/rpc", "https://arbitrum.blockpi.network/v1/rpc/public"] }, "optimism": { "network": "mainnet", diff --git a/blockchain-watcher/package.json b/blockchain-watcher/package.json index ababa846..8b85e6f0 100644 --- a/blockchain-watcher/package.json +++ b/blockchain-watcher/package.json @@ -3,7 +3,6 @@ "version": "0.0.5", "description": "A process for watching blockchain events and moving them to persistent storage", "main": "index.js", - "type": "module", "scripts": { "start": "node lib/start.js", "start:ncc": "node lib/index.js", diff --git a/blockchain-watcher/src/infrastructure/rpc/http/InstrumentedHttpProvider.ts b/blockchain-watcher/src/infrastructure/rpc/http/InstrumentedHttpProvider.ts index d756892b..764243b9 100644 --- a/blockchain-watcher/src/infrastructure/rpc/http/InstrumentedHttpProvider.ts +++ b/blockchain-watcher/src/infrastructure/rpc/http/InstrumentedHttpProvider.ts @@ -43,6 +43,9 @@ export class InstrumentedHttpProvider { method: method, body: JSON.stringify(body), signal: AbortSignal.timeout(opts?.timeout ?? this.timeout), + headers: { + "Content-Type": "application/json", + }, }); } catch (err: AxiosError | any) { // Connection / timeout error: