Skip to content

Connector: disconnects#1994

Merged
SebastienGllmt merged 3 commits intodevelopfrom
connector-disconnect
Mar 17, 2021
Merged

Connector: disconnects#1994
SebastienGllmt merged 3 commits intodevelopfrom
connector-disconnect

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.

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