-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: Check connection method #539
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,9 @@ export class MessageHandler { | |
case 'ADD_ESTABLISH': | ||
HandlerMethod.addEstablish(message, sendResponse); | ||
break; | ||
case 'CHECK_CONNECTION': | ||
HandlerMethod.checkEstablished(message, sendResponse); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You can create a new function to respond to the success event. Also, in my opinion, the case when the wallet is locked should be taken into account. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I'll look into this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aha, We didn't explain enough about running extensions. When you run the You can then register the result of the build command as an extension, and in the case of Chrome, you can load your extension after enabling developer mode at There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed and tested locally - sending There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be better to define a new success type instead of
|
||
break; | ||
case 'ADD_NETWORK': | ||
HandlerMethod.checkEstablished(message, sendResponse).then((isEstablished) => { | ||
if (isEstablished) { | ||
|
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.
Is a parameter of name necessary?
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.
yes, to check if the wallet is connected with the site that has this name, like the name passed in AddEstablish no ?
Or is it passed in AddEstablish just to be displayed in the popup while the value used to check the connection is the hostname ?
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.
Yes, the name variable passed in AddEstablish will only display the service name in the popup.
It is not needed for functions that simply check for connections.