Skip to content

Commit

Permalink
fix clientupdate proposal data
Browse files Browse the repository at this point in the history
  • Loading branch information
Sairam kola authored and Sairam kola committed Jan 4, 2024
1 parent 494434e commit 0840403
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions queryengine/native/proposals.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
gov "github.com/cosmos/cosmos-sdk/x/gov/types"
params "github.com/cosmos/cosmos-sdk/x/params/types/proposal"
upgrade "github.com/cosmos/cosmos-sdk/x/upgrade/types"
clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
)

type BasicMetadata struct {
Expand Down Expand Up @@ -62,6 +63,13 @@ func GetProposalMetadata(content *types1.Any) (BasicMetadata, error) {
Title: metadata.GetTitle(),
Description: metadata.GetDescription(),
}, nil
case "/ibc.core.client.v1.ClientUpdateProposal":
var metadata clienttypes.ClientUpdateProposal
metadata.Unmarshal(content.Value)
return BasicMetadata{
Title: metadata.GetTitle(),
Description: metadata.GetDescription(),
}, nil
default:
return BasicMetadata{}, fmt.Errorf("Proposal type: %s not found", typeUrl)
}
Expand Down

0 comments on commit 0840403

Please sign in to comment.