Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hansol-medi committed Dec 28, 2022
1 parent f73a2ca commit 44a3f47
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
4 changes: 2 additions & 2 deletions x/oracle/keeper/msg_server_oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (m msgServer) UpgradeOracle(goCtx context.Context, msg *types.MsgUpgradeOra
return &types.MsgUpgradeOracleResponse{}, nil
}

func (m msgServer) ApproveOracleUpgrade(goCtx context.Context, msg *types.MsgApproveOracleUpgrade) (*types.MsgApproveOracleUpgradeResponse, error) {
func (m msgServer) ApproveOracleUpgrade(goCtx context.Context, msg *types.MsgApproveOracleRegistration) (*types.MsgApproveOracleRegistrationResponse, error) {
// TODO: Implementation
return &types.MsgApproveOracleUpgradeResponse{}, nil
return &types.MsgApproveOracleRegistrationResponse{}, nil
}
2 changes: 0 additions & 2 deletions x/oracle/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgApproveOracleRegistration{}, "oracle/ApproveOracleRegistration", nil)
cdc.RegisterConcrete(&MsgUpdateOracleInfo{}, "oracle/UpdateOracleInfo", nil)
cdc.RegisterConcrete(&MsgUpgradeOracle{}, "oracle/UpgradeOracle", nil)
cdc.RegisterConcrete(&MsgApproveOracleUpgrade{}, "oracle/ApproveOracleUpgrade", nil)
}

func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
Expand All @@ -22,7 +21,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
&MsgApproveOracleRegistration{},
&MsgUpdateOracleInfo{},
&MsgUpgradeOracle{},
&MsgApproveOracleUpgrade{},
)
registry.RegisterImplementations((*govtypes.Content)(nil),
&OracleUpgradeProposal{},
Expand Down
26 changes: 0 additions & 26 deletions x/oracle/types/message_oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,29 +210,3 @@ func (m *MsgUpgradeOracle) GetSigners() []sdk.AccAddress {
}
return []sdk.AccAddress{oracleAddress}
}

func (m *MsgApproveOracleUpgrade) Route() string {
return RouterKey
}

func (m *MsgApproveOracleUpgrade) Type() string {
return "ApproveOracleUpgrade"
}

func (m *MsgApproveOracleUpgrade) ValidateBasic() error {
// TODO: Implementation
return nil
}

func (m *MsgApproveOracleUpgrade) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(m)
return sdk.MustSortJSON(bz)
}

func (m *MsgApproveOracleUpgrade) GetSigners() []sdk.AccAddress {
oracleAddress, err := sdk.AccAddressFromBech32(m.ApproverOracleAddress)
if err != nil {
panic(err)
}
return []sdk.AccAddress{oracleAddress}
}

0 comments on commit 44a3f47

Please sign in to comment.