Skip to content

Commit

Permalink
delete bech32 address
Browse files Browse the repository at this point in the history
  • Loading branch information
yutianwu committed Dec 19, 2022
1 parent ed90345 commit 453351e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 73 deletions.
71 changes: 0 additions & 71 deletions bsc/address.go

This file was deleted.

4 changes: 2 additions & 2 deletions x/oracle/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (m MsgClaim) GetSignBytes() []byte {

// ValidateBasic does a sanity check on the provided data.
func (m *MsgClaim) ValidateBasic() error {
if _, err := sdk.AccAddressFromBech32(m.FromAddress); err != nil {
if _, err := sdk.AccAddressFromHexUnsafe(m.FromAddress); err != nil {
return sdkerrors.ErrInvalidAddress.Wrapf("invalid from address: %s", err)
}

Expand Down Expand Up @@ -78,7 +78,7 @@ func (m *MsgClaim) ValidateBasic() error {

// GetSigners returns the expected signers for MsgCancelUpgrade.
func (m *MsgClaim) GetSigners() []sdk.AccAddress {
fromAddress, _ := sdk.AccAddressFromBech32(m.FromAddress)
fromAddress := sdk.MustAccAddressFromHex(m.FromAddress)
return []sdk.AccAddress{fromAddress}
}

Expand Down

0 comments on commit 453351e

Please sign in to comment.