Skip to content

Commit

Permalink
fix: rm bech32 check from owner address on ICA controller msgs Regist…
Browse files Browse the repository at this point in the history
…erInterchainAccount and SendTx (#2601)

* rm validate basic owner address check
  • Loading branch information
charleenfei authored Oct 31, 2022
1 parent 623e593 commit e8ff311
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
8 changes: 0 additions & 8 deletions modules/apps/27-interchain-accounts/controller/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ func (msg MsgRegisterInterchainAccount) ValidateBasic() error {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "owner address cannot be empty")
}

if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "failed to parse owner address: %s", msg.Owner)
}

return nil
}

Expand Down Expand Up @@ -68,10 +64,6 @@ func (msg MsgSendTx) ValidateBasic() error {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "owner address cannot be empty")
}

if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "failed to parse owner address: %s", msg.Owner)
}

if err := msg.PacketData.ValidateBasic(); err != nil {
return sdkerrors.Wrap(err, "invalid interchain account packet data")
}
Expand Down
14 changes: 0 additions & 14 deletions modules/apps/27-interchain-accounts/controller/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ func TestMsgRegisterInterchainAccountValidateBasic(t *testing.T) {
},
false,
},
{
"owner address is invalid",
func() {
msg.Owner = "invalid_address"
},
false,
},
}

for i, tc := range testCases {
Expand Down Expand Up @@ -125,13 +118,6 @@ func TestMsgSendTxValidateBasic(t *testing.T) {
},
false,
},
{
"owner address is invalid",
func() {
msg.Owner = "invalid_address"
},
false,
},
{
"relative timeout is not set",
func() {
Expand Down

0 comments on commit e8ff311

Please sign in to comment.