Skip to content

Commit 32704ca

Browse files
committed
refactor(keyring-snap-bridge): fix new eslint errors
1 parent 286014a commit 32704ca

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/keyring-snap-bridge/src/KeyringSnapControllerClient.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import type { Json } from '@metamask/utils';
1010
* to a snap through a `SnapController`.
1111
*/
1212
class SnapControllerSender implements Sender {
13-
#snapId: SnapId;
13+
readonly #snapId: SnapId;
1414

15-
#origin: string;
15+
readonly #origin: string;
1616

17-
#controller: SnapController;
17+
readonly #controller: SnapController;
1818

19-
#handler: HandlerType;
19+
readonly #handler: HandlerType;
2020

2121
/**
2222
* Create a new instance of `SnapControllerSender`.
@@ -59,7 +59,7 @@ class SnapControllerSender implements Sender {
5959
* `SnapController`.
6060
*/
6161
export class KeyringSnapControllerClient extends KeyringClient {
62-
#controller: SnapController;
62+
readonly #controller: SnapController;
6363

6464
/**
6565
* Create a new instance of `KeyringSnapControllerClient`.

packages/keyring-snap-bridge/src/SnapIdMap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class InvalidSnapIdError extends Error {
3838
* item to the map can modify or delete it.
3939
*/
4040
export class SnapIdMap<Value extends { snapId: SnapId }> {
41-
#map: CaseInsensitiveMap<Value>;
41+
readonly #map: CaseInsensitiveMap<Value>;
4242

4343
/**
4444
* Creates a new `SnapIdMap` object.

packages/keyring-snap-bridge/src/SnapKeyring.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class SnapKeyring extends EventEmitter {
106106
/**
107107
* Client used to call the Snap keyring.
108108
*/
109-
#snapClient: KeyringSnapControllerClient;
109+
readonly #snapClient: KeyringSnapControllerClient;
110110

111111
/**
112112
* Mapping between account IDs and an object that contains the associated
@@ -120,15 +120,15 @@ export class SnapKeyring extends EventEmitter {
120120
/**
121121
* Mapping between request IDs and their deferred promises.
122122
*/
123-
#requests: SnapIdMap<{
123+
readonly #requests: SnapIdMap<{
124124
promise: DeferredPromise<any>;
125125
snapId: SnapId;
126126
}>;
127127

128128
/**
129129
* Callbacks used to interact with other components.
130130
*/
131-
#callbacks: SnapKeyringCallbacks;
131+
readonly #callbacks: SnapKeyringCallbacks;
132132

133133
/**
134134
* Create a new Snap keyring.

0 commit comments

Comments
 (0)