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

Keplr.prototype.getKeysSettled rejects whole Promise when there is no chain info #1078

Open
emccorson opened this issue Mar 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@emccorson
Copy link

emccorson commented Mar 22, 2024

When calling Keplr.prototype.getKeysSettled(chainIds), if chainIds includes a chain ID that is not known to Keplr, the whole Promise is rejected.

I am not sure if this is intended behaviour, but I was expecting that the Promise would resolve but include a rejected entry for the unknown chain ID.

try {
  const result = await keplr.getKeysSettled(["cosmoshub-1", "some-unknown-chain-id"]);
  console.log(result);
  // expected [
  //   { status: "fulfilled", value: <cosmos info> },
  //   { status: "rejected", error: <error about unknown chain> }
  // ]
} catch (e) {
  console.log(e);
  // actually got this
}
@emccorson emccorson added the bug Something isn't working label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant