Skip to content

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

Description

@pro-wh

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions