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

SwitchNetwork returns a failure status when switching to the same network #538

Open
RezaRahemtola opened this issue Jul 29, 2024 · 0 comments

Comments

@RezaRahemtola
Copy link

When using window.adena.SwitchNetwork(chainId), if we are already connected to the same network the returned object is the following:

{
    "status": "failure",
    "data": {
        "chainId": "dev"
    },
    "code": 4001,
    "message": "Unable to change to the current network.",
    "type": "REDUNDANT_CHANGE_REQUEST"
}

Which isn't logical, as the end result is that we are on the requested network.
It should have a success status and a successful message imo, and keeping this type if it can be useful to the application to known that it was already on the right network.

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

No branches or pull requests

1 participant