Skip to content

Commit

Permalink
Merge pull request #2667 from Sifchain/fix/ledger-unlock-liquidity
Browse files Browse the repository at this point in the history
Fix for amino/ledger support for unbonding liquidity
  • Loading branch information
timlind authored Apr 23, 2022
2 parents e87d7b3 + c27b426 commit 3111b7d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions x/clp/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx"
)

var (
Expand All @@ -21,6 +22,19 @@ var (
_ sdk.Msg = &MsgModifyPmtpRates{}
_ sdk.Msg = &MsgUpdatePmtpParams{}
_ sdk.Msg = &MsgUpdateStakingRewardParams{}

_ legacytx.LegacyMsg = &MsgRemoveLiquidity{}
_ legacytx.LegacyMsg = &MsgRemoveLiquidityUnits{}
_ legacytx.LegacyMsg = &MsgCreatePool{}
_ legacytx.LegacyMsg = &MsgAddLiquidity{}
_ legacytx.LegacyMsg = &MsgSwap{}
_ legacytx.LegacyMsg = &MsgDecommissionPool{}
_ legacytx.LegacyMsg = &MsgUnlockLiquidityRequest{}
_ legacytx.LegacyMsg = &MsgUpdateRewardsParamsRequest{}
_ legacytx.LegacyMsg = &MsgAddRewardPeriodRequest{}
_ legacytx.LegacyMsg = &MsgModifyPmtpRates{}
_ legacytx.LegacyMsg = &MsgUpdatePmtpParams{}
_ legacytx.LegacyMsg = &MsgUpdateStakingRewardParams{}
)

func (m MsgUpdateStakingRewardParams) Route() string {
Expand Down Expand Up @@ -449,3 +463,15 @@ func (m MsgUnlockLiquidityRequest) GetSigners() []sdk.AccAddress {
}
return []sdk.AccAddress{addr}
}

func (m MsgUnlockLiquidityRequest) Route() string {
return RouterKey
}

func (m MsgUnlockLiquidityRequest) Type() string {
return "unlock_liquidity"
}

func (m MsgUnlockLiquidityRequest) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

0 comments on commit 3111b7d

Please sign in to comment.