Skip to content

Commit

Permalink
fix: move deprecation message to constructor functions (cosmos#5837)
Browse files Browse the repository at this point in the history
Co-authored-by: colin axnér <[email protected]>
  • Loading branch information
crodriguezvega and colin-axner authored Feb 14, 2024
1 parent 824b823 commit 531cff9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/core/02-client/types/legacy_proposal.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Deprecated: The legacy v1beta1 gov types maintained in this file are deprecated and will be removed in a future release.
// Please use MsgIBCSoftwareUpgrade and MsgRecoverClient in favour of the legacy v1beta1 gov proposal types.
package types

import (
Expand Down Expand Up @@ -33,6 +31,9 @@ func init() {
}

// NewClientUpdateProposal creates a new client update proposal.
//
// Deprecated: The legacy v1beta1 gov ClientUpdateProposal is deprecated
// and will be removed in a future release. Please use MsgRecoverClient instead.
func NewClientUpdateProposal(title, description, subjectClientID, substituteClientID string) govtypes.Content {
return &ClientUpdateProposal{
Title: title,
Expand Down Expand Up @@ -75,6 +76,9 @@ func (cup *ClientUpdateProposal) ValidateBasic() error {
}

// NewUpgradeProposal creates a new IBC breaking upgrade proposal.
//
// Deprecated: The legacy v1beta1 gov UpgradeProposal is deprecated
// and will be removed in a future release. Please use MsgIBCSoftwareUpgrade instead.
func NewUpgradeProposal(title, description string, plan upgradetypes.Plan, upgradedClientState exported.ClientState) (govtypes.Content, error) {
clientAny, err := PackClientState(upgradedClientState)
if err != nil {
Expand Down

0 comments on commit 531cff9

Please sign in to comment.