Skip to content

Commit

Permalink
Fix ibc client (#8341)
Browse files Browse the repository at this point in the history
* fix-ibc-client
* add changelog
  • Loading branch information
SegueII authored and amaury1093 committed Jan 19, 2021
1 parent 07a68b5 commit 2fc03e8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions x/ibc/core/04-channel/client/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ func QueryLatestConsensusState(
if err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}
clientState, err := clienttypes.UnpackClientState(clientRes.IdentifiedClientState.ClientState)
if err != nil {

var clientState exported.ClientState
if err := clientCtx.InterfaceRegistry.UnpackAny(clientRes.IdentifiedClientState.ClientState, &clientState); err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

Expand All @@ -148,8 +149,8 @@ func QueryLatestConsensusState(
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

consensusState, err := clienttypes.UnpackConsensusState(res.ConsensusState)
if err != nil {
var consensusState exported.ConsensusState
if err := clientCtx.InterfaceRegistry.UnpackAny(res.ConsensusState, &consensusState); err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

Expand Down

0 comments on commit 2fc03e8

Please sign in to comment.