You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I'm implementing a custom storage implementation for our needs, I noticed that the typing expectations for getEntries() method feels off:
publicgetEntries<T=any>(): Promise<[string,T][]>;
This method is supposed to return all objects stored by WalletConnect libs, which of course means that they will differ in shape.
This means that we cannot pass a generic like so:
storage.getEntries<SomeType>();
and expect all of the entries returned to satisfy SomeType - some of them will contain session's data, while others will contain pairings, expirer metadata, etc.
I think this should be changed to:
publicgetEntries(): Promise<[string,unknown][]>;
The text was updated successfully, but these errors were encountered:
Hi 👋
As I'm implementing a custom storage implementation for our needs, I noticed that the typing expectations for
getEntries()
method feels off:This method is supposed to return all objects stored by WalletConnect libs, which of course means that they will differ in shape.
This means that we cannot pass a generic like so:
and expect all of the entries returned to satisfy
SomeType
- some of them will contain session's data, while others will contain pairings, expirer metadata, etc.I think this should be changed to:
The text was updated successfully, but these errors were encountered: