Skip to content
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

Connector: disconnects #1994

Merged
merged 3 commits into from
Mar 17, 2021
Merged

Connector: disconnects #1994

merged 3 commits into from
Mar 17, 2021

Conversation

rooooooooob
Copy link
Contributor

Port disconnects cause the disconnect event to be dispatched to the
dApp.

Removing a site from the whitelist disconnects the associated port, if
it exists (e.g. actively connected).

Ports are now only initiated upon a request for read access to avoid
creating many ports for non-dApp websites.

Port disconnects cause the disconnect event to be dispatched to the
dApp.

Removing a site from the whitelist disconnects the associated port, if
it exists (e.g. actively connected).

Ports are now only initiated upon a request for read access to avoid
creating many ports for non-dApp websites.
@@ -139,6 +114,8 @@ class ErgoAPI {

const ergo = Object.freeze(new ErgoAPI());
`
const API_INTERNAL_ERROR = -2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three things:

  • Maybe these error codes should be documented somewhere?
  • Maybe these should should be in an enum instead of two separate variables
  • Why does it start at -2 instead of -1? Is -1 used for something else? Maybe document this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ergoplatform/eips#23 they're documented here in the EIP-0012 spec. They do start at -1, but we just don't reject things for InvalidRequest: -1 in the connector since input data verification happens elsewhere.

@SebastienGllmt SebastienGllmt merged commit 3da9643 into develop Mar 17, 2021
@SebastienGllmt SebastienGllmt deleted the connector-disconnect branch March 17, 2021 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants