Skip to content

Commit 3e04f14

Browse files
fix: undeprecate fetchPKPsThroughRelayer for browser environments
- Remove @deprecated tag and runtime warning from fetchPKPsThroughRelayer - Update documentation to indicate it's the preferred method for browser environments - Add warning to fetchPKPs about potential wallet popups in browser environments
1 parent ddb497c commit 3e04f14

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/lit-auth-client/src/lib/providers/BaseProvider.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ export abstract class BaseProvider {
120120
}
121121

122122
/**
123-
* @deprecated - Use {@link fetchPKPs} instead
124-
* Fetch PKPs associated with given auth method from relay server
123+
* Fetch PKPs associated with given auth method from relay server.
124+
* This is the preferred method for browser environments to avoid wallet popups.
125125
*
126126
* @param {AuthMethod} authMethod - Auth method object
127127
*
@@ -130,7 +130,6 @@ export abstract class BaseProvider {
130130
public async fetchPKPsThroughRelayer(
131131
authMethod: AuthMethod
132132
): Promise<IRelayPKP[]> {
133-
deprecated('fetchPKPsThroughRelayer is deprecated. Use fetchPKPs instead.');
134133
const data = await this.prepareRelayRequestData(authMethod);
135134
const body = this.prepareFetchBody(data);
136135
const fetchRes = await this.relay.fetchPKPs(body);
@@ -219,7 +218,9 @@ export abstract class BaseProvider {
219218
}
220219

221220
/**
222-
* Fetch PKPs associated with given auth method from pkp contract
221+
* Fetch PKPs associated with given auth method from pkp contract.
222+
* Note: Not recommended for browser environments as it may trigger wallet popups.
223+
* Use {@link fetchPKPsThroughRelayer} instead for browser environments.
223224
*
224225
* @param {AuthMethod} authMethod - Auth method object
225226
*

0 commit comments

Comments
 (0)