diff --git a/relayer/cmd/cli/keyring.go b/relayer/cmd/cli/keyring.go index 38a91866..8f1777ca 100644 --- a/relayer/cmd/cli/keyring.go +++ b/relayer/cmd/cli/keyring.go @@ -238,6 +238,12 @@ func (ck *cacheKeyring) MigrateAll() ([]*keyring.Record, error) { } func (ck *cacheKeyring) cacheKey(keyInfo *keyring.Record) error { + // If the local is nil, the `ExportPrivKeyArmor` will return `keyring.ErrPrivKeyExtr`. + // Usually it happens to the imported keys with the public key only, that's why we don't cache such keys. + if keyInfo.GetLocal() == nil { + return nil + } + pass := uuid.NewString() armor, err := ck.parentKeyring.ExportPrivKeyArmor(keyInfo.Name, pass) if err != nil {