Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [[5.6.21](https://github.com/multiversx/mx-sdk-dapp/pull/1728)] - 2026-03-11

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The pull request link for version [5.6.21] appears to be incorrect. It points to pull request #1728, but the change described below is from pull request #1727. To maintain consistency and correct traceability, the version link should also point to #1727.

Suggested change
## [[5.6.21](https://github.com/multiversx/mx-sdk-dapp/pull/1728)] - 2026-03-11
## [[5.6.21](https://github.com/multiversx/mx-sdk-dapp/pull/1727)] - 2026-03-11


- [Use websocket transport as default on websocket init](https://github.com/multiversx/mx-sdk-dapp/pull/1727)

## [[5.6.20](https://github.com/multiversx/mx-sdk-dapp/pull/1726)] - 2026-03-10

- [Added missing option to skip guardian checks in signTransactions function](https://github.com/multiversx/mx-sdk-dapp/pull/1726)
Expand Down
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-dapp",
"version": "5.6.20",
"version": "5.6.21",
"description": "A library to hold the main logic for a dapp on the MultiversX blockchain",
"author": "MultiversX",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export async function initializeWebsocketConnection(address: string) {
reconnectionAttempts: RECONNECTION_ATTEMPTS,
reconnectionDelay: RETRY_INTERVAL,
timeout: TIMEOUT,
query: { address }
query: { address },
transports: ['websocket']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While this change correctly forces the websocket transport, the corresponding unit test in src/methods/initApp/websocket/tests/initializeWebsocketConnection.test.ts has not been updated to assert this new option. Please update the test to ensure it checks for transports: ['websocket'] in the io call options to prevent future regressions.

For example, the test could be updated as follows:

// in src/methods/initApp/websocket/tests/initializeWebsocketConnection.test.ts
expect(io).toHaveBeenCalledWith(websocketUrl, {
  forceNew: true,
  reconnection: true,
  reconnectionAttempts: 3,
  reconnectionDelay: 500,
  timeout: 3000,
  query: { address: account.address },
  transports: ['websocket']
});

});

websocketConnection.instance.onAny(handleMessageReceived);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ describe('initializeWebsocketConnection tests', () => {
reconnectionAttempts: 3,
reconnectionDelay: 500,
timeout: 3000,
query: { address: account.address }
query: { address: account.address },
transports: ['websocket']
});
expect(mockSocketInstance.onAny).toHaveBeenCalled();
expect(mockSocketInstance.on).toHaveBeenCalledTimes(4);
Expand Down
Loading