Skip to content

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

Closed
@andynog

Description

@andynog

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A: bugAdmin: something isn't workingI: CLIInternal: related to the relayer's CLIO: usabilityObjective: cause to improve the user experience (UX) and ease using the product

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions