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

getVersion gives misleading return code when app is not open #291

Open
pro-wh opened this issue Nov 4, 2021 · 0 comments
Open

getVersion gives misleading return code when app is not open #291

pro-wh opened this issue Nov 4, 2021 · 0 comments

Comments

@pro-wh
Copy link
Contributor

pro-wh commented Nov 4, 2021

oh ok the error handling code (error-disregarding, I should say) in serializePath (in ledger-js lib) is wildly twisting the facts

that code reads as follows:

  async serializePath(path) {
    this.versionResponse = await getVersion(this.transport);
    switch (this.versionResponse.major) {
      case 0:
      case 1:
      case 2:
        return serializePathv1(path);
      default:
        return {
          return_code: 0x6400,
          error_message: "App Version is not supported",
        };
    }
  }

and the this.versionResponse we get when the app is not open is:
image

Originally posted by @pro-wh in oasisprotocol/wallet#376 (comment)

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