-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fulfill disconnect interface #56
Conversation
🦋 Changeset detectedLatest commit: 4da58ad The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
8b2f790
to
4f25eb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some mild reorganization
apps/extension/src/storage/origin.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
storage utilities moved to storage dir
@@ -22,6 +22,7 @@ export interface LocalStorageState { | |||
frontendUrl: string | undefined; | |||
passwordKeyPrint: KeyPrintJson | undefined; | |||
fullSyncHeight: number | undefined; | |||
// TODO: It's likely that an array is not the best data structure for this in storage. Should revisit later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved this comment to the storage types definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new handler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disconnect implementation
80a738e
to
4e1a17d
Compare
@@ -41,7 +40,7 @@ | |||
}, | |||
"web_accessible_resources": [ | |||
{ | |||
"resources": ["manifest.json"], | |||
"resources": ["manifest.json", "favicon/*"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expose the extension icon so dapps may use it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
injection is refactored into a class to more clearly and explicitly manage state.
the interface is async. so to provide the synchronous isConnected
state querying method, the state of the three possible actions are tracked, and resolved in the private function state
.
as expected, isConnected() => true
would indicate an active connection.
more information on the interface is available in client package documentation, but what it comes down to is:
- if no action has been attempted, the connection state is undefined.
- if the page has called
request
but the request is still pending, the connection state is undefined. - if the page has called
request
but the request failed, the connection state is false. - if connection has succeeded, the connection state is true.
- if the page has called
disconnect
, the connection state is false.
Going to take this PR over, rebase, and merge so we can cut a release given the proving key update |
792a1aa
to
4da58ad
Compare
thanks |
fulfill the disconnect interface published in
@penumbra-zone/client@9