Skip to content

Commit

Permalink
Temporary workaround (hotfix): do not call "extendUserAgent".
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Nov 9, 2024
1 parent 0e17949 commit 5bdf68c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/networkProviders/apiNetworkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/networkProviders/providers.dev.net.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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";

Expand All @@ -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";

Expand Down
1 change: 0 additions & 1 deletion src/networkProviders/proxyNetworkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<NetworkConfig> {
Expand Down

0 comments on commit 5bdf68c

Please sign in to comment.