Skip to content

Commit

Permalink
rename only the class
Browse files Browse the repository at this point in the history
  • Loading branch information
bangtoven committed Sep 29, 2023
1 parent 98770c7 commit 97ae87e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/wallet-sdk/src/connection/RxWebSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export enum ConnectionState {
CONNECTED,
}

export class RxWebSocket {
export class WalletLinkWebSocket {
private readonly url: string;
private webSocket: WebSocket | null = null;
private pendingData: string[] = [];
Expand Down
6 changes: 3 additions & 3 deletions packages/wallet-sdk/src/connection/WalletLinkConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
ClientMessageSetSessionConfig,
} from './ClientMessage';
import { DiagnosticLogger, EVENTS } from './DiagnosticLogger';
import { ConnectionState, RxWebSocket } from './RxWebSocket';
import { ConnectionState, WalletLinkWebSocket } from './RxWebSocket';
import {
isServerMessageFail,
ServerMessage,
Expand All @@ -34,7 +34,7 @@ const REQUEST_TIMEOUT = 60000;
* Coinbase Wallet Connection
*/
export class WalletLinkConnection {
private ws: RxWebSocket;
private ws: WalletLinkWebSocket;
private destroyed = false;
private lastHeartbeatResponse = 0;
private nextReqId = IntNumber(1);
Expand Down Expand Up @@ -75,7 +75,7 @@ export class WalletLinkConnection {
private diagnostic?: DiagnosticLogger,
WebSocketClass: typeof WebSocket = WebSocket
) {
const ws = new RxWebSocket(`${linkAPIUrl}/rpc`, WebSocketClass);
const ws = new WalletLinkWebSocket(`${linkAPIUrl}/rpc`, WebSocketClass);
this.ws = ws;

this.ws.setConnectionStateListener(async (state) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/wallet-sdk/src/relay/WalletLinkRelay.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

import { RxWebSocket } from '../connection/RxWebSocket';
import { WalletLinkWebSocket } from '../connection/RxWebSocket';
import { ServerMessageEvent } from '../connection/ServerMessage';
import { SessionConfig } from '../connection/SessionConfig';
import { WalletLinkConnection } from '../connection/WalletLinkConnection';
Expand All @@ -21,7 +21,7 @@ describe('WalletLinkRelay', () => {

beforeEach(() => {
jest.clearAllMocks();
jest.spyOn(RxWebSocket.prototype, 'connect').mockReturnValue(Promise.resolve());
jest.spyOn(WalletLinkWebSocket.prototype, 'connect').mockReturnValue(Promise.resolve());
});

describe('resetAndReload', () => {
Expand Down

0 comments on commit 97ae87e

Please sign in to comment.