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

Commands keys add and keys list don't output the right address #751

Closed
5 tasks done
andynog opened this issue Mar 18, 2021 · 0 comments · Fixed by #810
Closed
5 tasks done

Commands keys add and keys list don't output the right address #751

andynog opened this issue Mar 18, 2021 · 0 comments · Fixed by #810
Assignees
Labels
A: bug Admin: something isn't working I: CLI Internal: related to the relayer's CLI O: usability Objective: cause to improve the user experience (UX) and ease using the product
Milestone

Comments

@andynog
Copy link
Contributor

andynog commented Mar 18, 2021

Crate

ibc-relayer-cli

Summary of Bug

When adding a key that doesn't have the cosmos prefix, the cli outputs the wrong address even though the key file content is properly addded

Also the keys list command output the wrong address

Version

v0.1.1

Steps to Reproduce

Add the following key (this is a testing key so no worries about mnemonic exposed):

$ cat alice.json
{ 
	"name":"alice",
	"type":"local",
	"address":"chaina1v2hn2yg8hxwcsqp5w2ghan6ufvztaz5tg0qd89",
	"pubkey":"chainapub1addwnpepqtsrdrrdlhavee0h0md80gsmpktenkrgzap6a09ptysxlt7h69xuuykpa5a",
        "mnemonic":"oxygen soap solid wave swim dumb piece pass bronze horn bronze sweet acid radio reform clump team behind deer anxiety volcano reform jewel inspire"
}

Running the keys add commnad:

 hermes -c ~/.hermes/config.toml keys add chaina alice_key.json

Outputs the wrong address (with cosmos account prefix instead of chaina:

{"status":"success","result":"Added key a_key (cosmos1v2hn2yg8hxwcsqp5w2ghan6ufvztaz5tt9z4px) on chaina chain"}

But the key content is ok:

$ cat ~/.hermes/keys/chaina/keyring-test/a_key.json 
{ 
	"name":"alice",
	"type":"local",
	"address":"chaina1v2hn2yg8hxwcsqp5w2ghan6ufvztaz5tg0qd89",
	"pubkey":"chainapub1addwnpepqtsrdrrdlhavee0h0md80gsmpktenkrgzap6a09ptysxlt7h69xuuykpa5a",
        "mnemonic":"oxygen soap solid wave swim dumb piece pass bronze horn bronze sweet acid radio reform clump team behind deer anxiety volcano reform jewel inspire"
}

And the command keys list also outputs the wrong address:

hermes -c ~/.hermes/config.toml keys list chaina
{"status":"success","result":"chain: chaina -> a_key (cosmos1v2hn2yg8hxwcsqp5w2ghan6ufvztaz5tt9z4px)"}

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@andynog andynog added A: bug Admin: something isn't working I: CLI Internal: related to the relayer's CLI O: usability Objective: cause to improve the user experience (UX) and ease using the product labels Mar 18, 2021
@andynog andynog added this to the 03.2021 milestone Mar 18, 2021
@andynog andynog self-assigned this Mar 18, 2021
@andynog andynog changed the title Command keys add doesn't output the right address Commands keys add and keys list don't output the right address Mar 18, 2021
@romac romac assigned romac and unassigned cezarad and andynog Apr 8, 2021
@romac romac closed this as completed in #810 Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Admin: something isn't working I: CLI Internal: related to the relayer's CLI O: usability Objective: cause to improve the user experience (UX) and ease using the product
Projects
None yet
3 participants