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

refactor: simplify error #1480

Merged
merged 2 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions relayer/chains/cosmos/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ func (cc *CosmosProvider) GetAccountWithHeight(_ client.Context, addr sdk.AccAdd

// EnsureExists returns an error if no account exists for the given address else nil.
func (cc *CosmosProvider) EnsureExists(clientCtx client.Context, addr sdk.AccAddress) error {
if _, err := cc.GetAccount(clientCtx, addr); err != nil {
return err
}
return nil
_, err := cc.GetAccount(clientCtx, addr)
return err
}

// GetAccountNumberSequence returns sequence and account number for the given address.
Expand Down
5 changes: 1 addition & 4 deletions relayer/chains/cosmos/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,7 @@ func (cc *CosmosProvider) ListAddresses() (map[string]string, error) {

// DeleteKey removes a key from the keystore for the specified name.
func (cc *CosmosProvider) DeleteKey(name string) error {
if err := cc.Keybase.Delete(name); err != nil {
return err
}
return nil
return cc.Keybase.Delete(name)
}

// KeyExists returns true if a key with the specified name exists in the keystore, it returns false otherwise.
Expand Down
Loading