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

LedgerCosmos.CheckVersion error on unsupported version should display the Ledger major version for a better user experience #51

Closed
odeke-em opened this issue Oct 16, 2023 · 1 comment · Fixed by #57

Comments

@odeke-em
Copy link
Contributor

This switch

switch version.Major {
case 1:
return CheckVersion(ver, VersionInfo{0, 1, 5, 1})
case 2:
return CheckVersion(ver, VersionInfo{0, 2, 1, 0})
default:
return errors.New("App version is not supported")
sends back an error without context but really we should make it return the Ledger's major version so

Suggestion

 default: 
 	return fmt.Errorf("Ledger device version: %d is not supported", version.Major)

/cc @elias-orijtech @julienrbrt

@odeke-em
Copy link
Contributor Author

Same thing for

default:
return nil, errors.New("App version is not supported")

odeke-em added a commit to orijtech/ledger-cosmos-go that referenced this issue Oct 26, 2023
This change improves user experience (UX) by sending
over the major version information. While here, also
fixed up an unclear return.

Fixes cosmos#50
Fixes cosmos#51
ftheirs pushed a commit that referenced this issue Oct 30, 2023
This change improves user experience (UX) by sending over the major
version information. While here, also fixed up an unclear return.

Fixes #50
Fixes #51
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 a pull request may close this issue.

1 participant