Skip to content

Commit

Permalink
add: check err
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianToledano committed Nov 15, 2023
1 parent 712d4a7 commit 6cc1feb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/tx/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,11 @@ func (f Factory) getSimPK() (cryptotypes.PubKey, error) {
)

if f.simulateAndExecute && f.keybase != nil {
record, _ := f.keybase.Key(f.fromName)
record, err := f.keybase.Key(f.fromName)
if err != nil {
return nil, err
}

pk, ok = record.PubKey.GetCachedValue().(cryptotypes.PubKey)
if !ok {
return nil, errors.New("cannot build signature for simulation, failed to convert proto Any to public key")
Expand Down

0 comments on commit 6cc1feb

Please sign in to comment.