-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: active session management for stale / removed sessions (#356)
There have been reports that sessions no longer exist despite a Signer still being available. This PR introduces a more active role in the library to automatically detect this kind of a mismatch. It will remove a Signer when its session is no longer valid. A session might become invalid either by expiring, by a user disconnecting from the wallet, or some sort of a desync from IndexedDB. Adds better typing for Log classes, and disables logs during test:watch to make it easier to debug tests. Signed-off-by: Michael Kantor <[email protected]>
- Loading branch information
1 parent
197895d
commit d301015
Showing
8 changed files
with
899 additions
and
143 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export class SessionNotFoundError extends Error { | ||
constructor(message: string) { | ||
super(message) | ||
this.name = 'SessionNotFoundError' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.