diff --git a/.changeset/young-mayflies-sit.md b/.changeset/young-mayflies-sit.md new file mode 100644 index 0000000000000..7964966e860df --- /dev/null +++ b/.changeset/young-mayflies-sit.md @@ -0,0 +1,5 @@ +--- +'@mysten/sui.js': patch +--- + +Fix WebSocket constructor not being properly assigned in SuiClient HTTP transport diff --git a/sdk/typescript/src/client/http-transport.ts b/sdk/typescript/src/client/http-transport.ts index b04696a264f84..553c4a5a6cb44 100644 --- a/sdk/typescript/src/client/http-transport.ts +++ b/sdk/typescript/src/client/http-transport.ts @@ -76,7 +76,7 @@ export class SuiHTTPTransport implements SuiTransport { this.#websocketClient = new WebsocketClient( this.#options.websocket?.url ?? this.#options.url, { - WebSocketConstructor: this.#options.WebSocketConstructor, + WebSocketConstructor, ...this.#options.websocket, }, );