Skip to content

Commit 2b63d1e

Browse files
committed
feat: replace all javascript private properties with typescript private and underscore syntax to avoid issues with tslib until we decide they are safe for consumers
1 parent 50b9857 commit 2b63d1e

File tree

9 files changed

+226
-199
lines changed

9 files changed

+226
-199
lines changed

packages/auth/src/lib/authenticators/metamask/MetamaskAuthenticator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface DomainAndOrigin {
2727
}
2828

2929
export class MetamaskAuthenticator extends BaseAuthenticator {
30-
static readonly #logger = getChildLogger({
30+
private static readonly _logger = getChildLogger({
3131
module: 'MetamaskAuthenticator',
3232
});
3333
/**
@@ -54,7 +54,7 @@ export class MetamaskAuthenticator extends BaseAuthenticator {
5454
domain = options.domain || window.location.hostname;
5555
origin = options.origin || window.location.origin;
5656
} catch (e) {
57-
MetamaskAuthenticator.#logger.error(
57+
MetamaskAuthenticator._logger.error(
5858
'⚠️ Error getting "domain" and "origin" from window object, defaulting to "localhost" and "http://localhost"'
5959
);
6060
domain = options.domain || 'localhost';

packages/auth/src/lib/relay.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { WebAuthnAuthenticator } from './authenticators/WebAuthnAuthenticator';
2727
* Class that communicates with Lit relay server
2828
*/
2929
export class LitRelay implements IRelay {
30-
#logger = getChildLogger({
30+
private _logger = getChildLogger({
3131
module: 'LitRelay',
3232
});
3333
/** URL for Lit's relay server */
@@ -75,7 +75,7 @@ export class LitRelay implements IRelay {
7575
this.relayUrl =
7676
config.relayUrl || LitRelay.getRelayUrl(LIT_NETWORK.NagaDev);
7777
this.relayApiKey = config.relayApiKey || '';
78-
this.#logger.info({
78+
this._logger.info({
7979
msg: "Lit's relay server URL",
8080
relayUrl: this.relayUrl,
8181
});
@@ -100,7 +100,7 @@ export class LitRelay implements IRelay {
100100

101101
if (response.status < 200 || response.status >= 400) {
102102
const responseBody = await response.json();
103-
this.#logger.info({
103+
this._logger.info({
104104
msg: 'Something wrong with the API call',
105105
responseBody,
106106
});
@@ -117,7 +117,7 @@ export class LitRelay implements IRelay {
117117
);
118118
} else {
119119
const resBody = await response.json();
120-
this.#logger.info('Successfully initiated minting PKP with relayer');
120+
this._logger.info('Successfully initiated minting PKP with relayer');
121121
return resBody;
122122
}
123123
}
@@ -252,7 +252,7 @@ export class LitRelay implements IRelay {
252252

253253
if (response.status < 200 || response.status >= 400) {
254254
const responseBody = await response.json();
255-
this.#logger.info({
255+
this._logger.info({
256256
msg: 'Something wrong with the API call',
257257
responseBody,
258258
});
@@ -270,11 +270,11 @@ export class LitRelay implements IRelay {
270270
}
271271

272272
const resBody = await response.json();
273-
this.#logger.info({ msg: 'Response OK', resBody });
273+
this._logger.info({ msg: 'Response OK', resBody });
274274

275275
if (resBody.error) {
276276
// exit loop since error
277-
this.#logger.info({
277+
this._logger.info({
278278
msg: 'Something wrong with the API call',
279279
error: resBody.error,
280280
});
@@ -291,7 +291,7 @@ export class LitRelay implements IRelay {
291291
);
292292
} else if (resBody.status === 'Succeeded') {
293293
// exit loop since success
294-
this.#logger.info({ msg: 'Successfully authed', resBody });
294+
this._logger.info({ msg: 'Successfully authed', resBody });
295295
return resBody;
296296
}
297297

@@ -329,7 +329,7 @@ export class LitRelay implements IRelay {
329329

330330
if (response.status < 200 || response.status >= 400) {
331331
const resBody = await response.json();
332-
this.#logger.warn({
332+
this._logger.warn({
333333
msg: 'Something wrong with the API call',
334334
resBody,
335335
});
@@ -346,7 +346,7 @@ export class LitRelay implements IRelay {
346346
);
347347
} else {
348348
const resBody = await response.json();
349-
this.#logger.info('Successfully fetched PKPs with relayer');
349+
this._logger.info('Successfully fetched PKPs with relayer');
350350
return resBody;
351351
}
352352
}

0 commit comments

Comments
 (0)