From 5bdf68cdafc7b08ec3b8652589d4299168976e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Sat, 9 Nov 2024 10:21:25 +0200 Subject: [PATCH] Temporary workaround (hotfix): do not call "extendUserAgent". --- package-lock.json | 4 ++-- package.json | 2 +- src/networkProviders/apiNetworkProvider.ts | 1 - src/networkProviders/providers.dev.net.spec.ts | 6 +++--- src/networkProviders/proxyNetworkProvider.ts | 1 - 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a4489a3..c2db39f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@multiversx/sdk-core", - "version": "13.14.0", + "version": "13.14.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@multiversx/sdk-core", - "version": "13.14.0", + "version": "13.14.1", "license": "MIT", "dependencies": { "@multiversx/sdk-transaction-decoder": "1.0.2", diff --git a/package.json b/package.json index 7782f9de..07643a15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-core", - "version": "13.14.0", + "version": "13.14.1", "description": "MultiversX SDK for JavaScript and TypeScript", "author": "MultiversX", "homepage": "https://multiversx.com", diff --git a/src/networkProviders/apiNetworkProvider.ts b/src/networkProviders/apiNetworkProvider.ts index 177f3ab3..15fa56cd 100644 --- a/src/networkProviders/apiNetworkProvider.ts +++ b/src/networkProviders/apiNetworkProvider.ts @@ -34,7 +34,6 @@ export class ApiNetworkProvider implements INetworkProvider { this.config = { ...defaultAxiosConfig, ...config }; this.backingProxyNetworkProvider = new ProxyNetworkProvider(url, proxyConfig); this.axios = getAxios(); - extendUserAgent(this.userAgentPrefix, this.config); } private getProxyConfig(config: NetworkProviderConfig | undefined) { diff --git a/src/networkProviders/providers.dev.net.spec.ts b/src/networkProviders/providers.dev.net.spec.ts index d08e5b4f..f21f61d3 100644 --- a/src/networkProviders/providers.dev.net.spec.ts +++ b/src/networkProviders/providers.dev.net.spec.ts @@ -42,7 +42,7 @@ describe("test network providers on devnet: Proxy and API", function () { assert.deepEqual(apiResponse, proxyResponse); }); - it("should add userAgent unknown for clientName when no clientName passed", async function () { + it.skip("should add userAgent unknown for clientName when no clientName passed", async function () { const expectedApiUserAgent = "multiversx-sdk/api/unknown"; const expectedProxyUserAgent = "multiversx-sdk/proxy/unknown"; @@ -55,7 +55,7 @@ describe("test network providers on devnet: Proxy and API", function () { assert.equal(localProxyProvider.config.headers.getUserAgent(), expectedProxyUserAgent); }); - it("should set userAgent with specified clientName ", async function () { + it.skip("should set userAgent with specified clientName ", async function () { const expectedApiUserAgent = "multiversx-sdk/api/test"; const expectedProxyUserAgent = "multiversx-sdk/proxy/test"; @@ -72,7 +72,7 @@ describe("test network providers on devnet: Proxy and API", function () { assert.equal(localProxyProvider.config.headers.getUserAgent(), expectedProxyUserAgent); }); - it("should keep the set userAgent and add the sdk to it", async function () { + it.skip("should keep the set userAgent and add the sdk to it", async function () { const expectedApiUserAgent = "Client-info multiversx-sdk/api/test"; const expectedProxyUserAgent = "Client-info multiversx-sdk/proxy/test"; diff --git a/src/networkProviders/proxyNetworkProvider.ts b/src/networkProviders/proxyNetworkProvider.ts index 3762f0b7..436ab684 100644 --- a/src/networkProviders/proxyNetworkProvider.ts +++ b/src/networkProviders/proxyNetworkProvider.ts @@ -28,7 +28,6 @@ export class ProxyNetworkProvider implements INetworkProvider { this.url = url; this.config = { ...defaultAxiosConfig, ...config }; this.axios = getAxios(); - extendUserAgent(this.userAgentPrefix, this.config); } async getNetworkConfig(): Promise {